Slashdot Mirror


Going Dynamic with PHP

Five-Oh writes to tell us that IBM DeveloperWorks has an interesting article about the OO advantages of PHP V's new features. From the article: "PHP V5's new object-oriented programming features have raised the level of functionality in this popular language significantly. Learn how to use the dynamic features of PHP V5 to create objects that bend to fit your needs."

6 of 222 comments (clear)

  1. PHP's Comeupance by (1+-sqrt(5))*(2**-1) · · Score: 5, Informative
    I rediscovered PHP last week after a year-long hiatus, and was surpised to find that it approacheth Java in reflection and information hiding; that said, there are some lamentable lacunæ:
    • Class constants must be string literals and only string literals (no variables, arrays or objects).
    • Type-hinting is confined to arrays and objects (feature?).
    The unadorned output of phpDocumentor, PHP's analog to JavaDoc, is also suboptimal; for documenting PHP, therefore, go Doxygen.
    1. Re:PHP's Comeupance by sweetnjguy29 · · Score: 3, Informative

      Learned a new word: lacunæ (latin for lake) -- in this context, a gap. Well done, sire!

  2. Re:PHP 4 V. 5 by drpimp · · Score: 3, Informative

    This page actually has alot of links of changes and new features. What's New

    --
    -- Brought to you by Carl's JR
  3. Re:PHP 4 V. 5 by lbft · · Score: 5, Informative

    There's a good summary on Zend: http://www.zend.com/php5/andi-book-excerpt.php

    Basically, PHP 5 adds proper object support (think Java-style) including iterators for objects, and new extensions add good XML support, SOAP, SQLite, better MySQL support (prepared statements, OO interface, etc.)

    I'd recommend reading Adam Trachtenberg's book Upgrading to PHP 5 if you're familiar with PHP 4.

  4. Hosting services stuck on PHP4 by cknudsen · · Score: 4, Informative

    I'd love to take advantage of some of the PHP5 features. However, most hosting services are still stuck on PHP4. How long has it been now? I am the project manager for WebCalendar, and just like during the transition from PHP3 to PHP4, it's going to be some time before we can drop "legacy" support for PHP4 and take advantage of the cool new features of PHP5. So, for now, WebCalendar and other open source apps will have to stick to PHP4.
    FYI.... PHP developer articles updated daily:
    http://www.devpointer.net/browse.php?l=p&t1=1
    RSS:
    http://www.devpointer.net/browse.php?l=p&t1=1&fmt= rss1

    --
    http://www.k5n.us
  5. Re:PHP 4 V. 5 by Foofoobar · · Score: 4, Informative

    PHP5's object are passed via reference by default. Public/Private function and variables in classes are also now supported. The language as a whole has better OOP support and the underlying engine is alot faster as well.

    Also, some deprecated functionallity has finally been dropped. All in all, I've been using PHP5 for awhile now and everything works alot faster as a whole (as I use it with Apache 2 as well).

    One note that might concern you, PHP5 does not come with MySQL built in anymore. You either have to download the update or compile it yourself. It's nice for those who want to use something aside from MySQL and don't want to have to keep it the module loaded constantly but it's also a pain for the beginner hobbyist who has never had to deal with installing the MySQL module for PHP.

    --
    This is my sig. There are many like it but this one is mine.