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

Tiny quad-core ARM mini-PC runs Ubuntu with Cinnamon

A startup is pitching a $129-$199 “Imp” mini-PC on Indiegogo based on a quad-core Odroid-U3 SBC, with HDMI streaming and an Ubuntu/Cinnamon Linux desktop. A day after reporting on one Israeli-based, non-Android ARM mini-PC — SolidRun’s $100 CuBoxTV with OpenElec Linux — here comes another. Aside from the usual hyperbole found on crowdfunding pages — are we really “democratizing the digital home experience” or just buying an embedded ARM computer? — the Ubuntu-based Imp mini-PC looks like a pretty good deal. Read more

Ready to give Linux a try? These are the 5 distros you need to consider

There are so many Linux distributions that choosing one can be overwhelming for a new user. One might be too intimidating for a user to even try, while another might be too simplified, blocking that user from knowing how Linux systems actually function. I have been using Linux as my primary OS since 2005 and have tried all major (and quite a lot of minor) distributions. I have learned that not every distribution is for everyone. Since I also assist people in migrating to Linux, I have chosen the 5 distros that I recommend to new users based on their level of comfort and desire to learn (or not learn) more about Linux. Read more

Review of the new Firefox browser built for developers

Mozilla recently announced a new browser version for developers on the 10th anniversary of the Firefox browser. The Usersnap team and I took a look at whether it works well for the web development process, offers developers a variety of possible applications, and if it keeps up with the Google Chrome dev tools. Read more

Mapping the world with open source

In the world of geospatial technology, closed source solutions have been the norm for decades. But the tides are slowly turning as open source GIS software is gaining increasing prominence. Paul Ramsey, senior strategist at the open source company Boundless, is one of the people trying to change that. Ramsey has been working with geospatial software for over ten years, as programmer and consultant. He founded the PostGIS spatial database project in 2001, and is currently an active developer and member of the project steering committee. Ramsey serves as an evangelist for OpenGeo Suite, works with the Boundless business development team to share about their collection of offerigns, and speaks and teaches regularly at conferences around the world. Read more