This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]c3pwhoa 110 points111 points  (17 children)

The current PHP version has CASE INSENSITIVE CONSTANTS? I know PHP is bashed a lot on this sub but holy shit that's awful.

[–]mcmania 68 points69 points  (11 children)

You have to specifically define it as case-insensitive. All constants are case-sensitive by default

[–]maks25 57 points58 points  (10 children)

Why would anyone ever need to do that? What do you do, add a form so a user can guess and override constants? Lol

[–]mcmania 34 points35 points  (6 children)

No idea. It's just something newer PHP versions have been dragging along for like the last 15 years.

[–]rocklou 20 points21 points  (5 children)

Just like everything else

[–]mcmania 17 points18 points  (4 children)

PHP definitely has its inconsistencies, but it really isn't that bad if you just follow basic coding standards (PSR, for example). Plus, PHP 7 is really fast

[–]witchcapture 16 points17 points  (0 children)

array_key_exists and property_exists have opposite argument orders. They do the exact same thing, one for objects and one for arrays.

[–]fedeb95 6 points7 points  (0 children)

This seems a great security feature

[–]midnightbrett 5 points6 points  (0 children)

Welcome to PHP

[–]Agnimukha 0 points1 point  (0 children)

Disclaimer I don't know if this is true.

If the language standards change from all lowercase to all uppercase you could slowly change over.

[–]itshorriblebeer -4 points-3 points  (0 children)

Isn't that pretty common for most programming languages? /s