Language Selection

English French German Italian Portuguese Spanish

What’s new in PHP 5.3

Filed under
Software

In my previous post I mentioned that PHP 5.3 will be released in early 2008 so I think it’s just in time to talk about the features of this version. It is started by this polling (in detail, in an ordered version) on the internal list. The big gun features are namespaces, late static binding and mysqlnd, but there are other interesting improvements, for example __callStatic, dynamic static calls. In this part of this series we are going to analyze namespaces in detail.

NAMESPACES BASIC

Namespace support in PHP was a long-felt want feature. In PHP the main motivation behind adding namespace support to the language was to solve the problem of long class names. If you develop a bigger library, you have to use long class names to avoid naming conflicts, for example look at this monster: Zend_Search_Lucene_Analysis_Analyzer_Common_Text_CaseInsensitive.

From the version 5.3 you can group your code into namespaces. Different namespaces can contains classes, functions, constants with the same name. Defining a namespace is very straightforward, you should use the namespace statement in the very beginning of the file, for example:

part 1: namespaces

part 2: late static binding

part 3: mysqlnd

part 4: __callStatic, OpenID support, user.ini, XSLT profiling and more




More in Tux Machines

4 things governments need to know to adopt open source cloud - Red Hat

Open source cloud platforms, like OpenStack, can allow public sector agencies to connect systems and share data easily. Here are four things governments need to know to make open source cloud a success. Read more

Open source key to preserving human history, argues Vatican

Ammenti explained that, in order for the manuscripts to be readable, the Vatican Library opted for open source tools that do not require proprietary platforms, such as Microsoft Office, to be read. "We save it as a picture as it's longer life than a file. You don't rely on PowerPoint or Word. In 50 years they can still just look at it," he said. Read more

Open Source Router Connects US, Australia

The ONOS Project and partners said Wednesday they have demonstrated the real-world practicality of using a router with open source software to connect networks in Australia and the US. The test validates the vision of SDN, open source for carriers, as well as ON.Lab's ONOS network operating system, according to one of its coordinators. "SDN is about disaggregation of closed, proprietary boxes and separating of forwarding planes, control planes and applications," says Guru Parulkar, executive director and board member of ON.Lab , which coordinates ONOS development. The communications test between Australia and the US achieved just that, he says. (See ON.Lab Aims to Make White Boxes Carrier-Grade , ON.Lab Intros Open Source SDN OS and SK Telecom Bets on SDN for Wireless.) Read more

Xubuntu Core 15.04 Officially Released, Not Related to Ubuntu Core

A new official Xubuntu flavor called "core" has been announced by developers. It's based on Ubuntu, and it integrates the Xfce desktop environment and nothing else. Read more