Book Image

Object-Oriented Programming with PHP5

By : Hasin Hayder
Book Image

Object-Oriented Programming with PHP5

By: Hasin Hayder

Overview of this book

<p>Some basic objected-oriented features were added to PHP3; with PHP5 full support for object-oriented programming was added to PHP. Object-oriented programming was basically introduced to ease the development process as well as reduce the time of development by reducing the amount of code needed. OOP can greatly improve the performance of a properly planned and designed program.</p> <p>This book covers all the general concepts of OOP then shows you how to make use of OOP in PHP5, with the aid of an ample number of examples.</p>
Table of Contents (15 chapters)
Object-Oriented Programming with PHP5
Credits
About the Author
About the Reviewers
Introduction
Index

Introduction to MySQLi


MySQLi is an improved extension introduced in PHP5 to work with advanced MySQL features like prepared statements and stored procedures. From a performance point of view, MySQLi is much better than a MySQL extension. Also this extension offers completely object oriented interfaces to work with a MySQL database which was not available before PHP5. But keep in mind that if your MySQL version is at least 4.1.3 or above, you will get it working.

So what are the major improvements? Let's have a look first:

  • Improved performance over MySQL extensions

  • Flexible OO and Non OO interface

  • Advantage over new MySQL objects

  • Ability to create compressed connections

  • Ability to connect over SSL

  • Support for Prepared Statements

  • Support for Stored Procedure (SP)

  • Support for better replication and transaction

We will look into some of these features in the following examples. But of course we are not going for anything introductory to MySQL, because that is out of scope for this book. We will just...