reserved variable names |
[eluser]Unknown[/eluser]
in codeigniter as per the user guide $config,$lang etc are reserved variable names. i tried using these variables and i didn't see any issues. could you show by an example as to how and when using these reserved variable names will cause an issue?
[eluser]keevitaja[/eluser]
it depends, where you use them. if you are using $config in method or function, without declaring it to be global, then they are not global scope... http://php.net/manual/en/language.variables.scope.php
[eluser]skunkbad[/eluser]
Knowing that they are reserved, you should try to avoid using them, as they could cause conflicts and produce very hard to track down bugs. One time I did have a problem using the variable $output, which I believe is a reserved variable name. I don't recall exactly what I did, but I don't do user $output anymore. |
Welcome Guest, Not a member yet? Register Sign In |