Download presentation
Presentation is loading. Please wait.
Published byRosamund Thornton Modified over 9 years ago
1
<?php...
2
PHP 4 Internals Andi Gutmans PHP Group Member & Co-founder of Zend Technologies O’Reilly OSCON Monterey - July 2000
3
Presentation Overview What is PHP? Basic features of PHP How PHP interacts in the Web Environment History of PHP PHP 4 Architecture Design Concepts Building Blocks Other Highlights Future of PHP PHP Resources
4
What is PHP? HTML embedded scripting language Open source Native Web server support Rich selection of extensions for Web developers
5
Basic Features of PHP Multi-platform language (Linux, Windows NT, BSD, Solaris) Connectivity to most popular databases (MySQL, mSQL, ODBC, Microsoft SQL Server, Oracle, Informix, Sybase) Support of Java, XML, COM/DCOM (on Windows only), LDAP, IMAP
6
How PHP interacts in the Web Environment
7
<?php... History of PHP
8
PHP/FI 1 & 2: 1994-1997 1994 - Rasmus Lerdorf created PHP/FI, a set of Perl scripts Evolution into PHP/FI 1.0 and 2.0, advanced code that understood complex scripts PHP/FI picked up momentum as a multi-purpose Web scripting language
9
PHP 3: 1997 – 1998 Zeev Suraski and I rewrote scripting language and other core functionality Firm establishment of PHP core development group and open-source community Exponential growth of installed base Technological advances…
10
PHP 3: 1997 – 1998 Technological Advances Replacement of previous ‘line-by-line’ with ‘whole script analysis’ parsing technique Full-fledged scripting engine - more powerful syntax and functionality Object oriented programming Syntax highlighter Extendibility Unified Resource management Performance
11
PHP 4: 1998 - present PHP 4 and Zend Engine First development release – a conceptual quantum leap in design (May 1999 ) PHP 4 Beta 1 version (July 1999) Release of PHP 4.0.0 (May 2000)
12
<?php... PHP 4 Architecture Design Concepts Building Blocks Other Highlights
13
Basic Design Concepts Language optimized for writing HTML- embedded web applications Native Web server support “Compile-first, execute-later” paradigm (fast run-time performance of complex scripts) Zend Engine kernel independent of PHP functional shell
14
Basic Design Concepts (cont) Independent modular components (Run-time Compiler, Executor, Functional API) Compatibility with PHP 3 Functional extendibility (plug-in modules such as optimizer)
15
Building Blocks of PHP 4 Scripting engine Web server interface Extension support
16
Building Blocks – Scripting Engine Scripting Engine ‘Compile-first, execute-later’ paradigm Key benefits Fast & efficient Modular design with well-defined building blocks Independent of PHP Feature rich
17
Building Blocks - Scripting Engine PHP and Zend Engine Interaction
18
Building Blocks - Scripting Engine Speed and Efficiency Intermediate code $two = 2; $copy_of_two = $two; $employees = array("Amy", "Brenda", "Charlotte"); $hired_employees = $employees; $table = "oak"; $chair =& $table; $chair = "plastic"; Reference counting
19
Building Blocks - Scripting Engine Speed and Efficiency Smart resource management $user_ids=sql_query("select id from users"); while ($user=sql_fetch_object($user_ids)) { $result=sql_query("select * from salaries where id=$user->id");... sql_free_result($result); } Memory caching High performance extension API
20
Building Blocks - Scripting Engine Modular Design Concrete separation between operational units Compiler Executor Multi-threading support TSRM (Thread-Safe Resource Manager) Per thread global variables Virtual current working directory Zend Engine is a building block in itself
21
Building Blocks - Scripting Engine Feature Rich Fewer limitations Object syntax overloading support (Java and COM extensions) New language constructs: here-docs, foreach() loops, Boolean and null values Many new features
22
Building Blocks of PHP 4 Scripting engine Web server interface Extension support
23
Building Blocks – Web Server Interface Web Server Interface Goal: Cross Web Server support (Apache, IIS, Java servlets) Server abstraction layer (SAPI) Centralization Output Output buffering support Possible hook for XSL translator Get/POST/cookie variables (including multi-dimensional arrays)
24
Building Blocks of PHP 4 Scripting engine Web server interface Extension support
25
Building Blocks – Extension Support Improved Extension Support New build system Easy to add new modules Loadable module support Script for quick creation of a new extension skeleton Zend API documentation
26
Other PHP 4 Highlights Native HTTP session support Fallback system for clients that don’t support cookies: Session identifiers carried in the query string of the URL PCRE (Perl-like regular expressions) Shockwave Integrated XML and MySQL support
27
Future of PHP Corba support XSLT support New PHP QA initiative Commercial backing by Zend Technologies Zend Engine improvements
28
PHP Resources Websites http://www.php.net http://www.zend.com Mailing lists php-general-help@lists.php.net php-dev-help@lists.php.net
29
…?> The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.