Entry
Where can I get more information about PHP5?
What has changed in PHP5? Will my PHP4 scripts still work?
Will I have problems migrating from PHP4 to PHP5?
Aug 11th, 2004 10:22
Philip Olson,
At the time of this writing, PHP 5 is still a bit of a moving target.
Below are some articles that discuss PHP 5. Keep in mind that most PHP4
scripts will run just fine in PHP 5 and that the new features (most of
which involve OOP) are optional and not required. Also keep in mind
the dates the following articles were written, some are years old.
An interesting look at upcoming PHP5 features. Occasionally updated and
well organized:
* http://www.phpvolcano.com/articles/php5/
Some official PHP 5 docs exist on OOP:
* http://www.php.net/manual/en/language.oop5.php
To see facts and examples on what changed or was added in the second
Zend Engine (the engine that powers PHP 5) read ZEND_CHANGES or the
prettier (and more up-to-date) php.net equivelent here:
* http://www.php.net/zend-engine-2.php
* http://www.zend.com/php5/andi-book-excerpt.php
* http://cvs.php.net/co.php/ZendEngine2/ZEND_CHANGES
A list of PHP5 related articles from zend.com, and the PHP5 Feature
Spotlight that lists Zend.com articles/tutorials specific to PHP5:
* http://www.zend.com/zend/future.php
* http://www.zend.com/php5/
* http://www.zend.com/zend/php5/
Also the PHP manual has an appendix titled "Migration from PHP 4 to
PHP 5" that can be seen here:
* http://www.php.net/manual/en/migration5.php
PHP5 Panic. Tries to calm down peoples fears, like the fear that PHP is
just becoming Java. Includes discussion at the end:
* http://www.phppatterns.com/index.php/article/articleview/44/1/3/
A German article on how to get your PHP 4 scripts working in PHP 5:
* http://www.php-resource.de/forum/showthread.php?threadid=42717
A PHP magazine article titled: Zend Engine 2 - Internals Exposed
* http://php-mag.net/itr/online_artikel/psecom,id,382,nodeid,114.html
A PHP5 Introduction slideshow:
* http://ny1.php.net/talks/show.php/php5intro
Another talk/slideshow, this on OOP for PHP Application Servers:
* http://www.sebastian-bergmann.de/talks/adam-2003-oop.pdf
Yet another talk presentation on PHP 5:
* http://www.derickrethans.nl/files/nluug.pdf
A little Zend Engine 2 Q&A:
* http://www.zend.com/php/ask_experts.php
Interview with Sterling Hughes on PHP 5:
* http://www.php-con.com/2003/east/interviews/hughes.php
An introduction to PHP5. Also sift through the user comments for
related discussion as this column is a bit dated:
* http://www.phpbuilder.com/columns/argerich20030411.php3
The original ZE2 (PHP5) proposal. A little dated and changes have been
made but nonetheless still full of interesting information:
* http://www.zend.com/engine2/ZendEngine-2.0.pdf
And various other conference presensentations and talks with a few
being PHP5 related:
* http://talks.php.net/
Other notes to keep in mind:
- There is a PHP5 php.ini directive that puts PHP5 into PHP4
compatibility mode. In otherwords, your PHP4 scripts will for
sure [most likely] work.
This directive is called: zend.ze1_compatibility_mode
- PHP5 will become stable near the middle to end of 2004 but being
that it's a moving target it's hard to say for sure. For now
you may download it from here:
http://www.faqts.com/knowledge_base/view.phtml/aid/22153/fid/1150
- Many articles refer to namespaces being available in PHP5. As of
around June 2003 this is no longer true as they were removed. If
it's figured out how to implement them nicely then they will be put
back...
- There is no "official" or seperate PHP 5 manual. There is one
manual that has both PHP 4 and PHP 5 (and PHP 3) information.
This is because most information is identical with both versions.
PHP 5 specific information may be noted as such some time in the
future.
- MySQL support. There has been some confusion with regards to the
disabling of MySQL by default in PHP 5. This simply means that in
order to use MySQL you must explictly use --with-mysql just like
you do with most every other extension. Also, the client libraries
are no longer bundled, this means you must use your MySQL sources
instead of optionally using the version that comes with PHP 4.
People can still use --with-mysql[=DIR], this move isn't a big deal.
The reason for this action is three-fold:
- MySQL 3 (which is bundled in PHP 4) : This bundled library
was no longer properly maintained.
- MySQL 4 (never bundled) : Is GPL, so doesn't fit with the PHP
license.
- PHP is attempting to bundle less third party libraries.
- Also listed in the following faq:
http://php.net/manual/faq.databases.php#faq.databases.mysql.php5