0

Are the reserved words in PHP (final, public, function, etc) case-sensitive?

Would it be valid to write:

Final Public Function
Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Abdo
  • 131
  • 1
  • 8
  • 11
    Why don't you try it out ?? – Baba Oct 30 '12 at 16:37
  • Why did this need a question? Why not just try it and see if you get an error?! – David Gard Oct 30 '12 at 16:43
  • @MateiMihai, no, they are not! Keywords are case-insensitive! – jameshfisher Dec 17 '13 at 12:36
  • 4
    The closure of this question baffles me. "Not constructive"? "Likely to solicit extended discussion"? Not amenable to "facts" or "references"? What a load of tripe. The question is entirely well-defined, with either a "yes" or "no" answer, which should reference either the language reference or the reference implementation. – jameshfisher Dec 17 '13 at 12:39
  • @jameshfisher I completely agree. I have voted to re-open. – Duncan Jones Dec 17 '13 at 20:58

1 Answers1

2

I've never had a problem with case-sensitivity as it relates to reserved words. Sometimes I capitalize them, sometimes I don't. Take a look at this list for examples of usage:

http://us.php.net/manual/en/reserved.keywords.php

rws907
  • 787
  • 4
  • 14
  • 25