Welcome Guest, Not a member yet? Register   Sign In
capitalzation in class names
#1

[eluser]Unknown[/eluser]
In reading the user documentation, I came across this:

This is not valid:
Code:
<?php
class blog extends Controller {

}
?>

because the docs say the class name must be capitalized. However, I had been following a tutorial, and done this "incorrectly" using a lowercase class name, and it functioned correctly.

Is there something insidious that will happen because I'm not using first letter caps on my class names, or is the documentation perhaps outdated in this regard (as it seems to work fine)?
#2

[eluser]WanWizard[/eluser]
It is more like a coding convention. Class names in PHP are not case-sensitive, BLOG is the same as blog. It is very relevant for filenames though.




Theme © iAndrew 2016 - Forum software by © MyBB