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.


Messages In This Thread
constructor in PHP 5.3.3 - by El Forum - 11-08-2010, 07:55 AM
constructor in PHP 5.3.3 - by El Forum - 11-08-2010, 08:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB