PHP 4 vs 5

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...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-12-2004
Jennie
 
Posts: n/a
Default PHP 4 vs 5

Is there any advantage to upgrading to version 5?

TY


Reply With Quote
  #2 (permalink)  
Old 06-12-2004
Chris Hope
 
Posts: n/a
Default Re: PHP 4 vs 5

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/
Reply With Quote
  #3 (permalink)  
Old 06-13-2004
Jaanek Liiskmaa
 
Posts: n/a
Default Re: PHP 4 vs 5

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
>
>



Reply With Quote
  #4 (permalink)  
Old 06-14-2004
Jennie
 
Posts: n/a
Default Re: PHP 4 vs 5

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
> >
> >

>
>



Reply With Quote
  #5 (permalink)  
Old 06-14-2004
Chris Hope
 
Posts: n/a
Default Re: PHP 4 vs 5

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0