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

Intel Pentium vs. AMD Ryzen 3 Performance For Linux Gaming

For those that may be looking to assemble a new low-end Linux gaming system in early 2018, here is a look at the Linux gaming performance of an Intel Pentium (Kabylake) processor to an AMD Ryzen 3 while testing with the GeForce GTX 1050 and Radeon RX 560 graphics cards. Read more

Containers, the GPL, and copyleft: No reason for concern

Though open source is thoroughly mainstream, new software technologies and old technologies that get newly popularized sometimes inspire hand-wringing about open source licenses. Most often the concern is about the GNU General Public License (GPL), and specifically the scope of its copyleft requirement, which is often described (somewhat misleadingly) as the GPL’s derivative work issue. One imperfect way of framing the question is whether GPL-licensed code, when combined in some sense with proprietary code, forms a single modified work such that the proprietary code could be interpreted as being subject to the terms of the GPL. While we haven’t yet seen much of that concern directed to Linux containers, we expect more questions to be raised as adoption of containers continues to grow. But it’s fairly straightforward to show that containers do not raise new or concerning GPL scope issues. Read more

Get ready to use Linux containers

One of the most exciting things to happen in the Linux world in the past few years is the emergence of containers — self-contained Linux environments that live inside another OS and provide a way to package and isolate applications. They're not quite virtual systems, since they rely on the host OS to operate, nor are they simply applications. Dan Walsh from Red Hat has said that on Linux, "everything is a container," reminding me of the days when people claimed that everything on Unix was a file. But the vision has less to do with the guts of the OS and more to do with explaining how containers work and how they are different than virtual systems in some very interesting and important ways. Read more

Samsung unveils 860 PRO and EVO SATA SSDs with improved Linux compatibility

If you haven’t yet upgraded your operating system drive from a mechanical hard disk to a solid state drive, you are really missing out. Prices have dropped dramatically over the years, while at the same time, reliability has improved. Swapping an HDD for an SSD can be very easy too, thanks to cloning software that often comes with the drive. Before you buy some random SSD, please know that they are not all the same. True, SATA models largely have equal speeds these days, but the brand really matters from a reliability standpoint. If you want a dependable solid state drive for your data, you should take a look at Samsung. Its offerings are top notch, and today the company launches its newest SATA models -- the 860 PRO and EVO. Read more