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

Microsoft vs GNU/Linux

Netflix and GNU/Linux

today's howtos

KDE/Qt

  • Device Tailored Compositors with Qt Wayland at CLAAS E-Systems
    Have you heard about software in cars that run on embedded devices? Do you think that creating such software might be challenging? Well, welcome to a complete new world of complexity, welcome to the world of agriculture machines! For many years, automatic steering (on fields), terminals to control the complex mechanical operations of a self-driving 16 ton combine harvester on a soft ground, and self-optimization systems to optimize any tiny bit of your harvester, are key demands from customers. I, myself, am working at CLAAS E-Systems, the electronics and software department within the CLAAS group. Our group is well known for being among the leading manufacturers for combine harvesters, tractors and forage harvesters.
  • Qt Wayland Is Next Appearing On Tractors & Farm Equipment
    With Qt 5.8's Qt Wayland Compositor Framework taking shape, more developers are beginning to tailor a Qt Wayland compositor to their use-cases. One of those is a company specializing in farm equipment like combine harvesters, tractors, and harvesters. As a guest post on the official Qt blog, developer Andreas Cord-Landwehr of CLAAS E-Systems talked up Qt Wayland for their purposes in the highly-regulated agriculture industry.
  • KDevelop 5.1 Open-Source IDE Launches with LLDB and OpenCL Support, Many Changes
    The development team behind the popular, open-source, cross-platform, free and powerful KDevelop IDE (Integrated Development Environment) were proud to announce the official release and general availability of KDevelop 5.1. KDevelop 5.1 is now the most advanced stable version of the application, which is written entirely in Qt and designed to be used on various GNU/Linux distributions that usually ship with the KDE Plasma desktop environment, but also on the latest releases of the Microsoft Windows operating system.