290 likes | 464 Views
<?php. <?php. <?php. <?php. PHP 4 Internals. <?php. Andi Gutmans PHP Group Member & Co-founder of Zend Technologies O’Reilly OSCON Monterey - July 2000. <?php. Presentation Overview. What is PHP? Basic features of PHP How PHP interacts in the Web Environment History of PHP
E N D
<?php... <?php... <?php...
<?php... PHP 4 Internals <?php... Andi Gutmans PHP Group Member & Co-founder of Zend Technologies O’Reilly OSCON Monterey - July 2000 <?php...
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
What is PHP? • HTML embedded scripting language • Open source • Native Web server support • Rich selection of extensions forWeb developers
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
<?php... History of PHP <?php... <?php...
PHP/FI 1 & 2: 1994-1997 • 1994 - Rasmus Lerdorf createdPHP/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 amulti-purpose Web scripting language
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…
PHP 3: 1997 – 1998Technological 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
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)
<?php... PHP 4 ArchitectureDesign ConceptsBuilding BlocksOther Highlights <?php...
Basic Design Concepts • Language optimized for writing HTML- embedded web applications • Native Web server support • “Compile-first, execute-later” paradigm (fast run-time performance ofcomplex scripts) • Zend Engine kernel independentof PHP functional shell
Basic Design Concepts (cont) • Independent modular components (Run-time Compiler, Executor, Functional API) • Compatibility with PHP 3 • Functional extendibility (plug-inmodules such as optimizer)
Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support
Building Blocks – Scripting EngineScripting Engine • ‘Compile-first, execute-later’ paradigm • Key benefits • Fast & efficient • Modular design with well-definedbuilding blocks • Independent of PHP • Feature rich
Building Blocks - Scripting EnginePHP and Zend Engine Interaction
Building Blocks - Scripting EngineSpeed and Efficiency • Intermediate code • Reference counting • $two = 2;$copy_of_two = $two; • $employees = array("Amy", "Brenda", "Charlotte");$hired_employees = $employees; • $table = "oak";$chair =& $table;$chair = "plastic";
Building Blocks - Scripting EngineSpeed 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
Building Blocks - Scripting EngineModular 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
Building Blocks - Scripting EngineFeature 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
Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support
Building Blocks – Web Server InterfaceWeb 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)
Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support
Building Blocks – Extension SupportImproved 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
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
Future of PHP • Corba support • XSLT support • New PHP QA initiative • Commercial backing byZend Technologies • Zend Engine improvements
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
…?> The End …?> …?>