Presentation is loading. Please wait.

Presentation is loading. Please wait.

1Introduction to PHP 5 Presented by Brett Buddin.

Similar presentations


Presentation on theme: "1Introduction to PHP 5 Presented by Brett Buddin."— Presentation transcript:

1 1Introduction to PHP 5 Presented by Brett Buddin

2 2Introduction to PHP 5 What is PHP? “PHP: Hypertext Preprocessor” General purpose scripting language Most commonly used for server-side scripting

3 3Introduction to PHP 5

4 4 Why use PHP? Simple syntax Easy to learn Great performance Fantastic online documentation Open Source

5 5Introduction to PHP 5 History Initially released in June 1995 by Rasmus Lerdorf as “Personal Home Page Tools” Lerdorf merged PHP with his Form Interpreter to create PHP/FI Zeev Suraski and Andi Gutmans rewrote the parser to form the core of PHP 3

6 6Introduction to PHP 5 History PHP 4 released in May 2000 PHP 5 released in July 2004 Today powers millions of applications

7 7Introduction to PHP 5 Growth of PHP Source: Netcraft

8 8Introduction to PHP 5 New in PHP 5 Completely rewritten object model Interoperable XML tools MySQLi extension SQLite embedded Exception handling

9 9Introduction to PHP 5 Objects in PHP 3 and 4 Treated as primitive data types Assigned and passed by value Had to manually force pass by reference

10 10Introduction to PHP 5 Objects in PHP 5 Woven into the core Assigned and passed by handle This eliminates a lot of ampersands

11 11Introduction to PHP 5 Rewritten object model Interfaces and Abstract classes Class type hints Static keyword Final keyword

12 12Introduction to PHP 5 Rewritten object model Cloning Constructors and destructors Access modifiers

13 13Introduction to PHP 5 Cloning __clone() method Offers a way to create a copy of an object

14 14Introduction to PHP 5 Constructors and Destructors __construct() and __destruct() methods added Old constructor syntax still works

15 15Introduction to PHP 5 Access modifiers Access modifiers added for properties and methods The three P’s: –Public: All scopes have access –Private: Only local object has access –Protected: Only local and derived objects have access

16 16Introduction to PHP 5 Interoperable XML tools Standardized on libxml2 Extensions work together as a whole W3C specification compliant Very efficient

17 17Introduction to PHP 5 MySQLi Extension Prepared statements Bound input and output parameters SSL connections Multi-query functions

18 18Introduction to PHP 5 SQLite embedded No need for flat file databases SQLite supports –Transactions –Subqueries –Triggers

19 19Introduction to PHP 5 Exception handling Eliminates the need to check return values for every function Separation of business logic and error logic

20 20Introduction to PHP 5 PHP’s drawbacks Lack of language design Inconsistent naming conventions and function behavior Almost too popular

21 21Introduction to PHP 5 Questions?


Download ppt "1Introduction to PHP 5 Presented by Brett Buddin."

Similar presentations


Ads by Google