This is a discussion on PHP 4 vs 5 within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Is there any advantage to upgrading to version 5? TY...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Jennie wrote:
> Is there any advantage to upgrading to version 5? Check these pages out to see what's new and improver from version 4. http://www.zend.com/php5/in-depth.php http://www.zend.com/manual/migration5.oop.php http://www.zend.com/php/ask_experts.php I personally believe there's plenty of good reasons to upgrade, in particular the vastly improved object oriented model. -- Chris Hope The Electric Toolbox - http://www.electrictoolbox.com/ |
|
|||
|
hi
Read www.php.net. "Jennie" <hnix@adelphia.net> wrote in message news:beednQtHTLScxFfdRVn-hg@adelphia.com... > Is there any advantage to upgrading to version 5? > > TY > > |
|
|||
|
Will the old php 4 code still work too? So i will not have to update my
previous programs? "Jaanek Liiskmaa" <jaanek.liiskmaa@mail.ee> wrote in message news:cahseh$1j5h$1@news.eenet.ee... > hi > > Read www.php.net. > > > "Jennie" <hnix@adelphia.net> wrote in message > news:beednQtHTLScxFfdRVn-hg@adelphia.com... > > Is there any advantage to upgrading to version 5? > > > > TY > > > > > > |
|
|||
|
Jennie wrote:
> Will the old php 4 code still work too? So i will not have to update my > previous programs? Your scripts written using PHP4 should still work. Of course the only way to be 100% sure is to test them thoroughly on a development machine before putting them into production. I highly recommend you read the following: http://www.zend.com/php/ask_experts.php Here are some questions and answers from that page which help to answeryour questions. Will PHP 5 break backwards compatibility? No, the main functionality will stay the same, but since PHP 5 adds many more object-oriented features and tools, it will cause some of the older scripts using PHP 4.x to break. Objects made with PHP4, will they work also with PHP5? In general they will, however, the copying semantics of objects have changed so there is a slight chance you might have to fix certain places. Basically, in PHP 4, objects are basic types so whenever you assign or send an object to a function by-value a new copy is created. In PHP 5, an object is actually a handle to an object and you have to explicitly clone it in order to get a new copy. In most cases, this won't cause any backwards compatibility issues unless you expected the auto-cloning of PHP 4. How will backwards compatibility with MySQL be handled? Will scripts using MySQL work as they did in PHP 4? They should, yes. As long as you use the mysql extension (and not the mysqli extension, that builds on top of the new GPL'd client library), your scripts should run in exactly the same way. Other useful links are: http://www.zend.com/manual/migration5.oop.php http://www.zend.com/php5/in-depth.php* -- Chris Hope The Electric Toolbox - http://www.electrictoolbox.com/ |