Monthly Archives: June 2009

PHP 5.3: The Good, the Bad and the Ugly

PHP 5.3 was released today; here are my positive and negatives:

The Good: Closures

Anonymous functions created with create_function have always been a bit messy. With 5.3 comes support for closures with a much cleaner syntax:

    $greet = function($name)
    {
        printf("Hello %s\r\n", $name);
    };

    $greet('World');
    $greet('PHP');

The Bad: Backwards incompatible changes

Although not a massive change from 5.2, there are enough differences to break existing code.

The Ugly: Namespaces

There has been quite a discussion about PHP’s new namespace syntax.

$c = new \my\name\MyClass;

It’s just damn ugly. The more sensible choice, :: is already used as the scope resolution operator and was therefore dismissed.

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn

Synchronise your iPhone with Yahoo! Calendar

Since the iPhone OS 3 update, you can now use the CalDAV protocol to automatically keep your Yahoo! Calendar updated on your iPhone:

Can I sync with my iPhone over the air?

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn