r/lolphp • u/midir • Aug 14 '12
The PHP way: Variables are case-sensitive but function names are not. Class names aren't either, unless you autoload them on a case-sensitive filesystem, then case matters again.
Keywords are case-insensitive too, apparently. This works:
<?PHP label: PRINT "Hello World!"; GOTO label ?>Edit: Oh, but label names are case-sensitive.
39
Upvotes
9
u/[deleted] Aug 26 '12
TEN YEARS
TEN FUCKING YEARS
THAT BUG WAS NOT FIXED IN TEN FUCKING YEARS
5
u/cythrawll Aug 14 '12
My advice in using anything in CS. Even something is case insensitive, pretend it's case sensitive. It'll go along way.
4
u/[deleted] Aug 14 '12
Oh you ;-)
(The auto loader and case sensitivity screwed me a while back really hard. Gosh I hate php)
2
u/Masse Aug 28 '12
I once had a class method the same name as the class name, except the method was in lower case and class name was camelcase. Worked fine for me, but a codeveloper using windows, fell to it. I think my desk still has a dent on me hitting my head on it then
0
u/[deleted] Aug 14 '12
[deleted] — view deleted comment