Welcome Guest, Not a member yet? Register   Sign In
constructor in PHP 5.3.3
#1

[eluser]Stunt[/eluser]
This is just simple recommendation for you to use PHP 5.3.3 rules

There is too many performance and ability improves in new version of PHP like Namespaces and more ..

I think there is one change that you should pay attention today for future Codeigniter and this is Constructor !

In PHP 5.3.3 methods with the same name as the last element of a namespaced class name will no longer be treated as constructor.

This is better for you to use __construct instead of today CI user guide that tell you to create method function with same name of class ( on Models, Libraries etc.. ).
If you use __construct in CI future changes you just update your CI files and you dont need edit your code.

CI support __construct in current version and you can use it today.
#2

[eluser]Phil Sturgeon[/eluser]
Minor change with HUGE compatibility issues, all for no real improvement for the applications using it? Sounds great.




Theme © iAndrew 2016 - Forum software by © MyBB