1 / 29

<?php...

<?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

Download Presentation

<?php...

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. <?php... <?php... <?php...

  2. <?php... PHP 4 Internals <?php... Andi Gutmans PHP Group Member & Co-founder of Zend Technologies O’Reilly OSCON Monterey - July 2000 <?php...

  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 forWeb 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 theWeb Environment

  7. <?php... History of PHP <?php... <?php...

  8. 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

  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 – 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

  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 ArchitectureDesign ConceptsBuilding BlocksOther Highlights <?php...

  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 ofcomplex scripts) • Zend Engine kernel independentof PHP functional shell

  14. Basic Design Concepts (cont) • Independent modular components (Run-time Compiler, Executor, Functional API) • Compatibility with PHP 3 • Functional extendibility (plug-inmodules such as optimizer)

  15. Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support

  16. 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

  17. Building Blocks - Scripting EnginePHP and Zend Engine Interaction

  18. 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";

  19. 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

  20. 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

  21. 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

  22. Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support

  23. 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)

  24. Building Blocks of PHP 4 • Scripting engine • Web server interface • Extension support

  25. 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

  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 byZend 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 …?> …?>

More Related