What’s New in PHP 5?
Better object-oriented features aren’t the only new features of PHP 5. Many extensions have been rewritten to take advantage of PHP 5’s new capabilities, and many new extensions have been added to the distribution.
MySQL
The MySQL database is PHP’s partner in crime. Many developers power their web sites with MySQL, yet PHP’s original MySQL extension dates back to the days of PHP/FI. It’s showing its age.
In retrospect, some design decisions for the MySQL extension weren’t the best solution after all. Also, the latest versions of MySQL, 4.1 and 5.0, introduce many new features, some of which require significant changes to the extension.
As a result, PHP 5 comes with a completely new and improved MySQL extension. Dubbed MySQLi, for the MySQL Improved extension, MySQLi offers prepared statements, bound parameters, and SSL connections. It even takes advantage of PHP 5’s new object-oriented support to provide an OO interface to MySQL. This extension is covered in Chapter 3.
SQLite
While MySQL is greater than ever, it’s actually “too much database” for some jobs. SQLite is an embedded database library that lets you store and query data using an SQL interface without the overhead of installing and running a separate database application. It’s the topic of Chapter 4.
PHP 5 bundles SQLite, providing developers with a database that’s guaranteed to work on all PHP 5 installations. Despite the name, SQLite is a nowhere close to a “lite” database. It supports transactions, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access