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

The top 10 rookie open source projects

Open source has become the industry's engine of innovation. This year, for example, growth in projects related to Docker containerization trumped every other rookie area -- and not coincidentally reflected the most exciting area of enterprise technology overall. At the very least, the projects described here provide a window on what the global open source developer community is thinking, which is fast becoming a good indicator of where we're headed. Read more

First thoughts on KaOS 2014.12

The latest snapshot of this rolling release distribution includes initial support for UEFI, the KDE 4.14 desktop, systemd version 218 and the Qupzilla web browser. I mention Qupzilla because I feel it is a rare gem in the open source world, a quick capable browser that perhaps does not get the attention it deserves. KaOS is available in just one edition, a 64-bit x86 build. The ISO we download for KaOS is 1.6GB in size. Read more

6 big changes coming to Fedora 22

Hold on to your (red) hats. Fedora 22, the next iteration of the "move fast and break things" version of Linux sponsored by Red Hat, is set to arrive on May 19. After the multiple editions introduced in the previous Fedora, what's in store this time? The answer lies with the proposals received by the Fedora Engineering and Steering Committee (FESCo), whose deadline for proposed changes passed last week. Here are some of the more notable and head-turning proposals for Fedora 22 that seem most likely to make it to the final product. Read more

Sorry, Windows 10 Fans, but This Is What Icons Should Look Like

The icon theme of an operating system has more importance than people might imagine. Microsoft has updated the icons for the latest Windows 10 preview and they actually look terrible and they lack consistency. We listed a few Linux ones for a better comparison. Read more