PHP: Migrating from PHP 3 to PHP 4 - Manual
PHP  
downloads | documentation | faq | getting help | | php.net sites | links 
search for in the  
previousPublications about PHPRunning PHP 3 and PHP 4 concurrentlynext
Last updated: Tue, 16 Jul 2002
view this page in Printer friendly version | English | Brazilian Portuguese | Chinese | Czech | Dutch | Finnish | French | German | Hungarian | Italian | Japanese | Korean | Romanian | Russian | Spanish | Turkish

Dodatek B. Migrating from PHP 3 to PHP 4

What has changed in PHP 4

PHP 4 and the integrated Zend engine have greatly improved PHP's performance and capabilities, but great care has been taken to break as little existing code as possible. So migrating your code from PHP 3 to 4 should be much easier than migrating from PHP/FI 2 to PHP 3. A lot of existing PHP 3 code should be ready to run without changes, but you should still know about the few differences and take care to test your code before switching versions in production environments. The following should give you some hints about what to look for.

User Contributed Notes
Migrating from PHP 3 to PHP 4
add a note about notes

11-Jul-2002 05:39

In PHP3, setting an array element to a variable did not cause the element
to be created. In PHP4, it does and it doesn't. For example, in both
versions, the following:

  $x['y'] = $z;
  if (!isset($x['y'])) echo "not "; echo "set";

where $z is not set, will output "not set", as expected.
*However*, in PHP4, walking through the array with each() will return the
'y' element. In PHP3 it doesn't.


11-Jul-2002 07:37

Sorry, that should read "...setting an array element to a variable
which is not set...."

Hopefully someone will clear up my silly typo at some point.

add a note about notes
previousPublications about PHPRunning PHP 3 and PHP 4 concurrentlynext
Last updated: Tue, 16 Jul 2002
show source | credits | stats | mirror sites:  
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by:
Last updated: Sat Jul 20 08:32:23 2002 CEST