Going Dynamic with PHP 222
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."
PHP's Comeupance (Score:5, Informative)
Re:PHP 4 V. 5 (Score:3, Informative)
Re:PHP 4 V. 5 (Score:5, Informative)
There's a good summary on Zend: http://www.zend.com/php5/andi-book-excerpt.php [zend.com]
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 [oreilly.com] if you're familiar with PHP 4.
Hosting services stuck on PHP4 (Score:4, Informative)
FYI.... PHP developer articles updated daily:
http://www.devpointer.net/browse.php?l=p&t1=1 [devpointer.net]
RSS:
http://www.devpointer.net/browse.php?l=p&t1=1&fmt
Re:PHP 4 V. 5 (Score:5, Informative)
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.
Re:Experiences (Score:2, Informative)
Re:PHP 4 V. 5 (Score:2, Informative)
DB_DataObject (Score:2, Informative)
http://pear.php.net/manual/en/package.database.db
Re:PHP's Comeupance (Score:4, Informative)
Re:Experiences (Score:3, Informative)
YES!!!! Not just names, but parameter order as well. Most the functions work one way, but there are just enough that reverse target parameters that you can never be quite sure you got it right.
PHP: Over a billion functions served... and counting.
Re:Hosting services stuck on PHP4 (Score:2, Informative)
--Robert
Re:PHP 4 V. 5 (Score:2, Informative)
Sorry if it sounded like I meant that it does schema-reading magic and presents your tables to you as objects or something (although I don't doubt that there's code out there somewhere that does it, and it'd be very doable by implementing appropriate _get, _set and _call methods on your particular object. Look at the SOAP extension for an example of that sort of thing.)
While we're on the subject of OOP and PHP... (Score:2, Informative)
Re:PHP's Comeupance (Score:3, Informative)