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

2014: A Banner Year for Open Source

Open source was initially adopted for low cost and lack of vendor lock-in, but customers have found that it also results in better innovation and more flexibility. Now it is pervasive, and it is challenging proprietary incumbents across technology categories. It is not only mainstream, open source is truly leading innovation in areas like cloud, mobile, big data, the Internet of Things, and beyond. As we embark on a new year, I cannot help but reflect on the speed with which technology is changing. Rapidly delivering technology is about much more than just the technology – it is about people and culture. More than ever, this is why executives are looking at key technology companies – including Red Hat – as their partner instead of as a vendor. Read more

IsoHunt releases roll-your-own Pirate Bay

Open Source Meritocracy Is More Than a Joke

In January 2014, Github removed the rug in its office's waiting room in response to criticism of its slogan, "United Meritocracy of Github." Since then, the criticism of the idea of meritocracy has spread in free software circles. "Meritocracy is a joke," has become a slogan seen on T-shirts and constantly proclaimed, especially by feminists. Such commentary is true — so far as it goes, but it ignores the potential benefits of meritocracy as an ethos. Anyone who bothers to look can see that meritocracy is more of an ideal than a standard practice in free software. The idea that people should be valued for their contributions may seem to be a way to promote fairness, but the practice is frequently more complicated. Read more Also: Unmanagement and unleadership

Linux Kernel Developers Consider Live Kernel Patching Solution

kPatch and kGraph may soon enable live kernel updates on all Linux distributions, making it possible to apply security and other patches on the open source operating system without rebooting. Read more