Forgot your password?
typodupeerror
PHP Programming IT Technology

PHP 5.3 Released 120

Posted by timothy
from the phffp-phffp-phffp dept.
Sudheer writes "The PHP development team is proud to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. Some of the key new features include: namespaces, late static binding, closures, optional garbage collection for cyclic references, new extensions (like ext/phar, ext/intl and ext/fileinfo), over 140 bug fixes and much more."
This discussion has been archived. No new comments can be posted.

PHP 5.3 Released

Comments Filter:
  • features! (Score:2, Informative)

    by Lord Ender (156273) on Tuesday June 30, 2009 @10:55AM (#28528473) Homepage

    PHP now comes with more GOTO!

  • by whoisthis (1532893) on Tuesday June 30, 2009 @11:40AM (#28529171)
    see whats new in PHP 5.3 [webdigi.co.uk]. Namespaces, phar, Closures & Lambdas, Functors, Traits,Magic functions. See link above for examples.
  • by amicusNYCL (1538833) on Tuesday June 30, 2009 @11:57AM (#28529485)

    You can also read the official release announcement instead of some random guy's blog.

    http://php.net/releases/5_3_0.php [php.net]

  • Re:Nuisances (Score:4, Informative)

    by Stan Vassilev (939229) on Tuesday June 30, 2009 @12:46PM (#28530483)

    There's a huge codebase out there that's using PHP against MySQL, and using PHP's original ereg regex syntax instead of the Perl-wannabe stuff. What are they thinking, when they set out to break this?

    Nothing is broken. Ereg is moved to the 'official' extension pack called PECL, which you can use for full backwards compatibility. At the same time the community has been warning not to use the ereg functions for the past at least 3-4 years, if not more, citing worse performance, worse featureset, and the possibility of PCRE replacing it at some point in the future.

  • by Anonymous Coward on Tuesday June 30, 2009 @10:38PM (#28537925)

    It might be easier to think about them as anonymous functions than as lambdas / closures, though they're both.

    They can fit anywhere that used to take a callback. For example, array_walk() and array_map() can be written in a much more sane way, without having to create an external function and refer to it by name.

  • by searlea (95882) on Wednesday July 01, 2009 @04:56AM (#28539817)

    Assuming your argument-order frustration lies with the classic needle/haystack inconsistency throughout the string and array functions, the whole issue goes away if the PHP guys would simply evolve the string and array natives to be treated like objects:


    in_array($needle, $haystack) -> $array->contains($needle)
    strpos($haystack, $needle) -> $string->pos($needle)
    etc.

    Do that, and people will naturally migrate from the old inconsistent methods and move towards the more natural and consistent new methods without breaking anything.

    If you really think it's worth breaking backwards compatibility, you could implement a friends suggestion - adding the PHP version number to the <?php wrapper: i.e. change to <?php6 ... ?>. Job done.

FORTH IF HONK THEN

Working...