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

today's howtos

A tour of Google's 2016 open source releases

Open source software enables Google to build things quickly and efficiently without reinventing the wheel, allowing us to focus on solving new problems. We stand on the shoulders of giants, and we know it. This is why we support open source and make it easy for Googlers to release the projects they're working on internally as open source. We've released more than 20-million lines of open source code to date, including projects such as Android, Angular, Chromium, Kubernetes, and TensorFlow. Our releases also include many projects you may not be familiar with, such as Cartographer, Omnitone, and Yeoman. Read more

Viewing Linux Logs from the Command Line

At some point in your career as a Linux administrator, you are going to have to view log files. After all, they are there for one very important reason...to help you troubleshoot an issue. In fact, every seasoned administrator will immediately tell you that the first thing to be done, when a problem arises, is to view the logs. And there are plenty of logs to be found: logs for the system, logs for the kernel, for package managers, for Xorg, for the boot process, for Apache, for MySQL… For nearly anything you can think of, there is a log file. Read more

At Long Last, Linux Gets Dynamic Tracing

When the Linux kernel version 4.9 will be released next week, it will come with the last pieces needed to offer to some long-awaited dynamic thread-tracing capabilities. As the keepers of monitoring and debugging software start using these new kernel calls, some of which have been added to the Linux kernel over the last two years, they will be able to offer much more nuanced, and easier to deploy, system performance tools, noted Brendan Gregg, a Netflix performance systems engineer and author of DTrace Tools, in a presentation at the USENIX LISA 2016 conference, taking place this week in Boston. Read more