php PHP 4 Internals php Andi Gutmans PHP
![](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-1.jpg)
![<? php. . . PHP 4 Internals <? php. . . Andi Gutmans PHP <? php. . . PHP 4 Internals <? php. . . Andi Gutmans PHP](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-2.jpg)
![Presentation Overview l What is PHP? Basic features of PHP l How PHP interacts Presentation Overview l What is PHP? Basic features of PHP l How PHP interacts](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-3.jpg)
![What is PHP? l HTML embedded scripting language l Open source l Native Web What is PHP? l HTML embedded scripting language l Open source l Native Web](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-4.jpg)
![Basic Features of PHP l l l Multi-platform language (Linux, Windows NT, BSD, Solaris) Basic Features of PHP l l l Multi-platform language (Linux, Windows NT, BSD, Solaris)](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-5.jpg)
![How PHP interacts in the Web Environment How PHP interacts in the Web Environment](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-6.jpg)
![<? php. . . History of PHP <? php. . . <? php. . . History of PHP <? php. . .](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-7.jpg)
![PHP/FI 1 & 2: 1994 -1997 l l l 1994 - Rasmus Lerdorf created PHP/FI 1 & 2: 1994 -1997 l l l 1994 - Rasmus Lerdorf created](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-8.jpg)
![PHP 3: 1997 – 1998 l l Zeev Suraski and I rewrote scripting language PHP 3: 1997 – 1998 l l Zeev Suraski and I rewrote scripting language](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-9.jpg)
![PHP 3: 1997 – 1998 Technological Advances l l Replacement of previous ‘line-by-line’ with PHP 3: 1997 – 1998 Technological Advances l l Replacement of previous ‘line-by-line’ with](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-10.jpg)
![PHP 4: 1998 - present l PHP 4 and Zend Engine l First development PHP 4: 1998 - present l PHP 4 and Zend Engine l First development](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-11.jpg)
![<? php. . . PHP 4 Architecture Design Concepts Building Blocks Other Highlights <? <? php. . . PHP 4 Architecture Design Concepts Building Blocks Other Highlights <?](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-12.jpg)
![Basic Design Concepts l l Language optimized for writing HTMLembedded web applications Native Web Basic Design Concepts l l Language optimized for writing HTMLembedded web applications Native Web](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-13.jpg)
![Basic Design Concepts (cont) l l l Independent modular components (Run -time Compiler, Executor, Basic Design Concepts (cont) l l l Independent modular components (Run -time Compiler, Executor,](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-14.jpg)
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-15.jpg)
![Building Blocks – Scripting Engine l ‘Compile-first, execute-later’ paradigm l Key benefits l l Building Blocks – Scripting Engine l ‘Compile-first, execute-later’ paradigm l Key benefits l l](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-16.jpg)
![Building Blocks - Scripting Engine PHP and Zend Engine Interaction Building Blocks - Scripting Engine PHP and Zend Engine Interaction](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-17.jpg)
![Building Blocks - Scripting Engine Speed and Efficiency l Intermediate code l Reference counting Building Blocks - Scripting Engine Speed and Efficiency l Intermediate code l Reference counting](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-18.jpg)
![Building Blocks - Scripting Engine Speed and Efficiency l Smart resource management $user_ids=sql_query("select id Building Blocks - Scripting Engine Speed and Efficiency l Smart resource management $user_ids=sql_query("select id](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-19.jpg)
![Building Blocks - Scripting Engine Modular Design l l Concrete separation between operational units Building Blocks - Scripting Engine Modular Design l l Concrete separation between operational units](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-20.jpg)
![Building Blocks - Scripting Engine Feature Rich l l Fewer limitations Object syntax overloading Building Blocks - Scripting Engine Feature Rich l l Fewer limitations Object syntax overloading](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-21.jpg)
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-22.jpg)
![Building Blocks – Web Server Interface l Goal: Cross Web Server support (Apache, IIS, Building Blocks – Web Server Interface l Goal: Cross Web Server support (Apache, IIS,](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-23.jpg)
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-24.jpg)
![Building Blocks – Extension Support Improved Extension Support l l l New build system Building Blocks – Extension Support Improved Extension Support l l l New build system](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-25.jpg)
![Other PHP 4 Highlights l Native HTTP session support l Fallback system for clients Other PHP 4 Highlights l Native HTTP session support l Fallback system for clients](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-26.jpg)
![Future of PHP l Corba support l XSLT support l New PHP QA initiative Future of PHP l Corba support l XSLT support l New PHP QA initiative](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-27.jpg)
![PHP Resources l l Websites l http: //www. php. net l http: //www. zend. PHP Resources l l Websites l http: //www. php. net l http: //www. zend.](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-28.jpg)
![](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-29.jpg)
- Slides: 29
![](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-1.jpg)
![php PHP 4 Internals php Andi Gutmans PHP <? php. . . PHP 4 Internals <? php. . . Andi Gutmans PHP](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-2.jpg)
<? php. . . PHP 4 Internals <? php. . . Andi Gutmans PHP Group Member & Co-founder of Zend Technologies <? php. . . O’Reilly OSCON Monterey - July 2000
![Presentation Overview l What is PHP Basic features of PHP l How PHP interacts Presentation Overview l What is PHP? Basic features of PHP l How PHP interacts](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-3.jpg)
Presentation Overview l What is PHP? Basic features of PHP l How PHP interacts in the Web Environment l History of PHP l PHP 4 Architecture l l Design Concepts Building Blocks Other Highlights l Future of PHP l PHP Resources
![What is PHP l HTML embedded scripting language l Open source l Native Web What is PHP? l HTML embedded scripting language l Open source l Native Web](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-4.jpg)
What is PHP? l HTML embedded scripting language l Open source l Native Web server support l Rich selection of extensions for Web developers
![Basic Features of PHP l l l Multiplatform language Linux Windows NT BSD Solaris Basic Features of PHP l l l Multi-platform language (Linux, Windows NT, BSD, Solaris)](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-5.jpg)
Basic Features of PHP l l l Multi-platform language (Linux, Windows NT, BSD, Solaris) Connectivity to most popular databases (My. SQL, m. SQL, ODBC, Microsoft SQL Server, Oracle, Informix, Sybase) Support of Java, XML, COM/DCOM (on Windows only), LDAP, IMAP
![How PHP interacts in the Web Environment How PHP interacts in the Web Environment](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-6.jpg)
How PHP interacts in the Web Environment
![php History of PHP php <? php. . . History of PHP <? php. . .](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-7.jpg)
<? php. . . History of PHP <? php. . .
![PHPFI 1 2 1994 1997 l l l 1994 Rasmus Lerdorf created PHP/FI 1 & 2: 1994 -1997 l l l 1994 - Rasmus Lerdorf created](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-8.jpg)
PHP/FI 1 & 2: 1994 -1997 l l l 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
![PHP 3 1997 1998 l l Zeev Suraski and I rewrote scripting language PHP 3: 1997 – 1998 l l Zeev Suraski and I rewrote scripting language](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-9.jpg)
PHP 3: 1997 – 1998 l l Zeev Suraski and I rewrote scripting language and other core functionality Firm establishment of PHP core development group and open-source community l Exponential growth of installed base l Technological advances…
![PHP 3 1997 1998 Technological Advances l l Replacement of previous linebyline with PHP 3: 1997 – 1998 Technological Advances l l Replacement of previous ‘line-by-line’ with](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-10.jpg)
PHP 3: 1997 – 1998 Technological Advances l l Replacement of previous ‘line-by-line’ with ‘whole script analysis’ parsing technique Full-fledged scripting engine - more powerful syntax and functionality l Object oriented programming l Syntax highlighter l Extendibility l Unified Resource management l Performance
![PHP 4 1998 present l PHP 4 and Zend Engine l First development PHP 4: 1998 - present l PHP 4 and Zend Engine l First development](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-11.jpg)
PHP 4: 1998 - present l PHP 4 and Zend Engine l First development release – a conceptual quantum leap in design (May 1999 ) l PHP 4 Beta 1 version (July 1999) l Release of PHP 4. 0. 0 (May 2000)
![php PHP 4 Architecture Design Concepts Building Blocks Other Highlights <? php. . . PHP 4 Architecture Design Concepts Building Blocks Other Highlights <?](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-12.jpg)
<? php. . . PHP 4 Architecture Design Concepts Building Blocks Other Highlights <? php. . .
![Basic Design Concepts l l Language optimized for writing HTMLembedded web applications Native Web Basic Design Concepts l l Language optimized for writing HTMLembedded web applications Native Web](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-13.jpg)
Basic Design Concepts l l Language optimized for writing HTMLembedded 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
![Basic Design Concepts cont l l l Independent modular components Run time Compiler Executor Basic Design Concepts (cont) l l l Independent modular components (Run -time Compiler, Executor,](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-14.jpg)
Basic Design Concepts (cont) l l l Independent modular components (Run -time Compiler, Executor, Functional API) Compatibility with PHP 3 Functional extendibility (plug-in modules such as optimizer)
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-15.jpg)
Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension support
![Building Blocks Scripting Engine l Compilefirst executelater paradigm l Key benefits l l Building Blocks – Scripting Engine l ‘Compile-first, execute-later’ paradigm l Key benefits l l](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-16.jpg)
Building Blocks – Scripting Engine l ‘Compile-first, execute-later’ paradigm l Key benefits l l Fast & efficient Modular design with well-defined building blocks l Independent of PHP l Feature rich
![Building Blocks Scripting Engine PHP and Zend Engine Interaction Building Blocks - Scripting Engine PHP and Zend Engine Interaction](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-17.jpg)
Building Blocks - Scripting Engine PHP and Zend Engine Interaction
![Building Blocks Scripting Engine Speed and Efficiency l Intermediate code l Reference counting Building Blocks - Scripting Engine Speed and Efficiency l Intermediate code l Reference counting](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-18.jpg)
Building Blocks - Scripting Engine Speed and Efficiency l Intermediate code l Reference counting l $two = 2; $copy_of_two = $two; l $employees = array("Amy", "Brenda", "Charlotte"); $hired_employees = $employees; l $table = "oak"; $chair =& $table; $chair = "plastic";
![Building Blocks Scripting Engine Speed and Efficiency l Smart resource management useridssqlqueryselect id Building Blocks - Scripting Engine Speed and Efficiency l Smart resource management $user_ids=sql_query("select id](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-19.jpg)
Building Blocks - Scripting Engine Speed and Efficiency l 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); } l Memory caching l High performance extension API
![Building Blocks Scripting Engine Modular Design l l Concrete separation between operational units Building Blocks - Scripting Engine Modular Design l l Concrete separation between operational units](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-20.jpg)
Building Blocks - Scripting Engine Modular Design l l Concrete separation between operational units l Compiler l Executor Multi-threading support l l TSRM (Thread-Safe Resource Manager) l Per thread global variables l Virtual current working directory Zend Engine is a building block in itself
![Building Blocks Scripting Engine Feature Rich l l Fewer limitations Object syntax overloading Building Blocks - Scripting Engine Feature Rich l l Fewer limitations Object syntax overloading](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-21.jpg)
Building Blocks - Scripting Engine Feature Rich l l Fewer limitations Object syntax overloading support (Java and COM extensions) New language constructs: here-docs, foreach() loops, Boolean and null values Many new features
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-22.jpg)
Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension support
![Building Blocks Web Server Interface l Goal Cross Web Server support Apache IIS Building Blocks – Web Server Interface l Goal: Cross Web Server support (Apache, IIS,](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-23.jpg)
Building Blocks – Web Server Interface l Goal: Cross Web Server support (Apache, IIS, Java servlets) l Server abstraction layer (SAPI) l Centralization l l Output buffering support l Possible hook for XSL translator Get/POST/cookie variables (including multi-dimensional arrays)
![Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-24.jpg)
Building Blocks of PHP 4 l Scripting engine l Web server interface l Extension support
![Building Blocks Extension Support Improved Extension Support l l l New build system Building Blocks – Extension Support Improved Extension Support l l l New build system](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-25.jpg)
Building Blocks – Extension Support Improved Extension Support l l l New build system l Easy to add new modules l Loadable module support Script for quick creation of a new extension skeleton Zend API documentation
![Other PHP 4 Highlights l Native HTTP session support l Fallback system for clients Other PHP 4 Highlights l Native HTTP session support l Fallback system for clients](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-26.jpg)
Other PHP 4 Highlights l Native HTTP session support l Fallback system for clients that don’t support cookies: Session identifiers carried in the query string of the URL l PCRE (Perl-like regular expressions) l Shockwave l Integrated XML and My. SQL support
![Future of PHP l Corba support l XSLT support l New PHP QA initiative Future of PHP l Corba support l XSLT support l New PHP QA initiative](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-27.jpg)
Future of PHP l Corba support l XSLT support l New PHP QA initiative l l Commercial backing by Zend Technologies Zend Engine improvements
![PHP Resources l l Websites l http www php net l http www zend PHP Resources l l Websites l http: //www. php. net l http: //www. zend.](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-28.jpg)
PHP Resources l l Websites l http: //www. php. net l http: //www. zend. com Mailing lists l php-general-help@lists. php. net l php-dev-help@lists. php. net
![](https://slidetodoc.com/presentation_image_h/fad625187748eccaa8db0c729bd9f2cb/image-29.jpg)
Enlist the steps for booting the operating system
Mfc internals
Windows kernel internals
Slidetodoc.com
Operating system internals and design principles
Windows internals
Operating systems: internals and design principles
Linux kernel internals
Unix internals
Nt kernel & system
Notifychangedirectory
Windows kernel internals
Operating systems: internals and design principles
Zfs internals
Mfc internals
B.ntns
Jvm internals
Host instance
Vnode unix
Azure internals
Operating systems: internals and design principles
Unix internals
Mfc 프로그래밍
Shivaram venkataraman
Windows kernel internals
Sql server internals and architecture
Operating systems internals and design principles
Operating system internals and design principles
Android internals
Operating system internals and design principles