2.1.3 Current releaseThis is NOT the latest copy of this book; click here for the latest version.
PHP 5 was a big step forward for the language, although admittedly not as big as the jump from PHP 3 to PHP 4. The release is focused on language maturity, and offers a lot of new functionality that has simply been missing from previous versions simply because the language was a little too simple to properly support larger projects.
PHP 5 brought with it huge steps forward for object-oriented scripts - developers are now able to declare how their objects may be used, which makes it easier for one developer to work with another's code. Furthermore, there is a wide variety of functions available for objects that make them much more flexible and easy to work with - unified constructors are only available from v5 upwards.
PHP 5 also brought with it new error checking in the form of try/catch - something that programmers from other languages had been enjoying for a long time. Furthermore, objects are now always handled as references in order to help programmers who just do not understand how objects work.
The biggest improvements, though, were in the extensions: SimpleXML has landed, which is a fast and easy-to-learn way to interact with XML documents, and there's also the flat-file database API SQLite, a new SOAP extension, MySQL Improved, and a lot more.
At the time of writing, PHP 5.0.2 is the latest release, and surprisingly few issues have been found with it. Indeed, PHP 5 has proved to be a much more stable release than PHP 4, which should be very encouraging!
|
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.
My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!
|