1 / 8

Wrapping up…

Learn about the new features and improvements in PHP 5 and MySQL 4.1, including object-oriented programming, MySQLi extension, XML support, and more.

dgriswold
Download Presentation

Wrapping up…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wrapping up… PHP 5 and MySQL 4.1

  2. PHP 5 • Main features: • PHP 5 improves on PHP 4 in three major areas: • Object-oriented programming • MySQL • XML • These items have all been completely rewritten, turning them from limitations into star attractions. • Full article

  3. Support for Object-Oriented Programming • Constructors (create an instance of a class) • Destructors (dispense with an instance) • Public, protected, and private properties and methods • Interfaces (defined way of accessing a class) • Abstract classes • Class type hints • Static properties and methods • Final properties and methods • A whole suite of magical methods • Full articles: [Object Design] [Object Primer]

  4. MySQL support PHP 5 comes with a completely new and improved MySQL extension. Dubbed MySQLi, for MySQL Improved. It offers: • Prepared statements • Bound input and output parameters • SSL connections • Multi-query functions • MySQLi takes advantage of PHP 5's new object-oriented support to provide an OO interface to MySQL. On top of that, the latest versions of MySQL now enable subselects, transactions, and replication. • PHP 5 bundles SQLite, providing developers with a database that's guaranteed to work on all PHP 5 installations.

  5. XML Support The new XML extensions: • Work together as a unified whole. • Are standardized on a single XML library: libxml2. • Fully comply with W3 specifications. • Efficiently process data. • Provide the right XML tool for your job • SimpleXML extension allows you to interact with the information in an XML document as though these pieces of information are arrays and objects, iterating through them with for-each loops, and editing them in place merely by assigning new values to variables.

  6. Other improvements • Exception handling • SOAP implementation • Iterators are an incredibly handy way to abstract away messy details from code: $dir = opendir($path); while (false !== ($file = readdir($dir))) { print "$file\n"; }closedir($dir); foreach (new DirectoryIterator($path) as $file) { print "$file\n";} The Old Way The New Way

  7. MySQL 4.1 Improvements: • Subqueries:SELECT (SELECT column1 FROM table1) FROM table2; • Testing membershipSELECT column1FROM table 1WHERE NOT EXISTS (SELECT column1 FROM table2); • Full article

  8. So, the future… Looks Good! Thank you.

More Related