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

[The founder of Linux Malta] Ramon Casha, chairman of the humanist association, passes away

Tributes are flowing in this evening for Ramon Casha, chairman of the Malta Humanist Society, civil rights campaigner and a frequent commenter on Times of Malta, who has passed away. Michael Briguglio, former chairman of Alternattiva wrote in a Facebook post: Rest in peace Ramon Casha: honest, free-thinking and non-partisan civil society campaigner within Malta Humanist Association and so many causes. Read more

KDE Leftovers

  • Qt Creator 4.2.1 released
    We are happy to announce the release of Qt Creator 4.2.1. This is a pure bugfix release, and takes care of various important bugs.
  • KTextEditor depends on KSyntaxHighlighting
    Recently, the KSyntaxHighlighting framework was added to the KDE Frameworks 5.29 release. And starting with KDE Frameworks 5.29, KTextEditor depends on KSyntaxHighlighting. This also means that KTextEditor now queries KSyntaxHighlighting for available xml highlighting files.
  • [Krita] Interview with Adam
    Good day. My name is Adam and I am a 26-year-old person who is trying to learn how to draw…
  • [Krita] We’re doing a User Survey!
    While we’re still working on Vector, Text and Python Scripting, we’ve already decided: This year, we want to spend on stabilizing and polishing Krita!

More of today's howtos

Linux and Graphics