Language Selection

English French German Italian Portuguese Spanish

What’s new in PHP 5.3

Filed under

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.


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

Review: openSUSE Tumbleweed (2018)

My experiment with openSUSE's Tumbleweed was a mixed experience. On the positive side, Tumbleweed stays constantly up to date, providing the latest packages of software all the time. For people who regularly want to stay on the cutting edge, but who do not want to re-install or perform a major version-to-version upgrade every six months, Tumbleweed provides an attractive option. I also really like that file system snapshots are automated and we can revert most problems simply by restarting the computer and choosing an older snapshot from the boot menu. On the negative side, a number of things didn't work during my time with the distribution. Media support was broken, the Discover software manager had a number of issues and some configuration modules caused me headaches. These rough edges sometimes get fixed, but may be traded out for other problems since the operating system is ever in flux. In the long term, a bigger issue may be the amount of network bandwidth and disk space Tumbleweed consumes. Just to keep up with updates we need set aside around 1GB of downloads per month and (when Btrfs snapshots are used) even more disk space. In a few weeks Tumbleweed consumed more disk space with far fewer programs installed as my installation of MX Linux. Unless we keep on top of house cleaning and constantly remove old snapshots we need to be prepared to use significantly more storage space than most other distributions require. Tumbleweed changes frequently and uses more resources to keep up with the latest software developments. I would not recommend it for newer Linux users or for people who want predictability in the lives. But for people who want to live on the cutting edge and don't mind a little trouble-shooting, Tumbleweed provides a way to keep up with new versions of applications while providing a safety net through Btrfs snapshots. Read more

Linux 4.20-rc6

Hmm. Things look fairly normal. just under half of the patch is to drivers (gpu, networking, nvdimm, block, media..), with the rest being tooling (mostly bpf selftests) core networking, documentation and some arch updates, Some filesystem, core kernel and mm fixes in there too (we've had some last-minute THP reverts and discussion for how to re-do it next time). Most of it looks pretty small and normal. Would I have preferred for there to be less churn? Yes. But it's certainly smaller than rc5 was, so we're moving in the right direction, and we have at least one more rc to go. I say "at least", not because I'm particularly worried about the technical details and any outstanding bugs, but because of the whole holiday season timing. I still suspect that what I'll do is release 4.20 just before xmas (so with the usual "rc7->final" cadence) but then just leave a dead week for the holiday season. Again encouraging everybody to send in their pull request for the merge window *before* the holiday season, but I might just either ignore them for a week, or take it very slow and easy. And of course, if we have something worrisome come up, any technical issues can derail that plan, but I don't think there's anything bad pending now. Linus Read more Also: Linux 4.20-rc6 Kernel Released - "Looks Fairly Normal"

Audiocasts: Linux Action News, OpenBSD in Stereo, GNU World Order, Coder Radio and Open Source Security Podcast

  • Linux Action News 83
    Plus the Kernel team’s clever Spectre slowdown fix, Emby goes proprietary, Steam Link lives on, and more.
  • OpenBSD in Stereo | BSD Now 275
    DragonflyBSD 5.4 has been released, down the Gopher hole with OpenBSD, OpenBSD in stereo with VFIO, BSD/OS the best candidate for legally tested open source Unix, OpenBGPD adds diversity to the routing server landscape, and more.
  • GNU World Order
    More listener email about ZFS. Noise music. More about workflows, and how to find the right application for your task.
  • Coder Radio 334
    Mike and Chris don’t claim to have a time machine, but they still have a major problem to solve.
  • Open Source Security Podcast: Episode 126 - The not so dire future of supply chain security
    Josh and Kurt continue the discussion from episode 125. We look at the possible future of software supply chains. It's far less dire than previously expected.