Pro PHP- Patterns, Frameworks, Testing and More

(vip2019) #1
41

■ ■ ■


CHAPTER 5


What's New in PHP 6


PHP 6 is a major upgrade to the PHP language. The core focus for PHP 6 is native Unicode
support, which will allow you to seamlessly use multiple languages within your applications.
Programmers in non-English-speaking countries will even be able to name their functions and
classes in their own native language. Unicode support is quickly becoming extremely important, as
more and more of your applications will be targeting users worldwide.
Beyond multilanguage support, PHP 6 also adds some advanced OOP concepts, such as
namespaces and late static binding. If properly used, these features will allow you to better
organize your classes and methods.
PHP 6 also serves as a chance to break some backward-compatibility and clean up existing
functions. You will find support for register_globals, magic_quotes_gpc, and safe_mode removed,
along with the PHP 4 ze1 compatibility mode. The parameter ordering of a few functions has
also been updated to make the API more consistent.
Finally, PHP 6 includes several new classes like XMLWriter, which add new functionality to
the PHP language.

■Note In tracking any open source project, it is often hard to predict how the language will evolve. This
chapter is based largely on rumored information and proposed changes that may change before the final
release of PHP 6. In order to keep current with these changes, I will try to maintain an up-to-date erratum on
this chapter, which you can access in the Book Extras section on the web page for this book on the Apress
site (http://www.apress.com/book/view/1590598199).

PHP Installation


Eventually, PHP 6 will be included in the package management systems for your operating
system, but until then, some manual installation is required. Here, I’ll focus on the manual
installation of modules that are not under package management (at the time of this writing)
on Debian/Ubuntu Linux-based operating systems. I will also assume that you are using the
Apache 2.2 web server.
To get started, you will need some basic packages from package management. Install the
following packages using apt-get install:

McArthur_819-9C05.fm Page 41 Wednesday, February 27, 2008 8:38 AM

Free download pdf