[PHPwestoz] any opinions on moving to php5?
Nicolas Connault
nicou at sweetpeadesigns.com.au
Mon Jan 3 13:39:02 UTC 2005
Sol wrote:
>Has anyone out there migrated to php5?
>
>I'm in the situation where all my code is in php4 but nothing I write
>personally is OOPHP. But now I want to move into OOPHP because I'm
>writing larger programmes and can see the benefits. Yet PHP's OO syntax
>in PHP5 is quite different and I'm not sure if I want to make the effort
>of learning, and then later relearning OOPHP _AND_ having to migrate
>scripts. But on the other hand I have installed applications that run
>under php4 and I'm guessing these will break if I move to php5. Nearly
>all of the many web applications I run are php based. What to do?
>
>cheers; sol
>
>_______________________________________________
>Phpwestoz mailing list
>Phpwestoz at lists.linux.org.au
>http://lists.linux.org.au/listinfo/phpwestoz
>
>
>
Having migrated some of my applications to PHP5, I can reassure you by
saying that PHP5 is mostly backward-compatible with PHP4's OO syntax.
One of the main differences lie not in the OO syntax, but in a few
modules and functions, such as mysql functions, which must all be
migrated to "mysqli". To correctly write PHP5 OO code, you'll need to
modify your existing classes to take advantage of the many new features
that are available, but overall the migration is quite straight-forward.
Don't hesitate to write about some specific problems you may encounter.
Cheers,
Nicolas
More information about the PHPwestoz
mailing list