0
PHP: The Beginning and the Zend Presentation by Jonathan Hawk. Available under the Creative Commons Attribution Share-Alik...
History <ul><li>1994 – Started development
1995-06-08 – PHP/FI
1997-11-01 – PHP/FI 2
1998-06-06 – PHP 3
2000-05-22 – PHP 4 (powered by Zend Engine)
2001-12-10 – PHP 4.1 (superglobals)
2002-12-27 – PHP 4.3 (CLI)
2004-07-13 – PHP 5 (powered by Zend Engine II)
2009-06-30 – PHP 5.3 (namespaces, closures) </li></ul>http://upload.wikimedia.org/wikipedia/commons/a/ac/RasmuswJGang.jpg ...
Rasmus Lerdorf <ul><li>Twitter: @rasmus </li></ul>https://secure.wikimedia.org/wikipedia/commons/wiki/File:Rasmus_Lerdorf_...
http://www.flickr.com/photos/isthmene/4370546993 (CC-BY-NC)
Andi Gutmans & Zeev Suraski <ul><li>Twitter: @andigutmans/ @zeevs </li></ul>https://secure.wikimedia.org/wikipedia/commons...
http://www.flickr.com/photos/heyskinny/549085823 (CC-BY-NC)
Use: When? <ul><li>Web sites and Web applications </li><ul><li>Easy to learn* – finally your web designers can help with t...
** = web designers should not help you with the back end </li></ul></ul><li>CLI scripts
GUI applications (PHP-GTK)
Available on Linux, Unix, Windows , Mac OS X,  AS/400, Novell NetWare, OS/2, RISC OS, SGI IRIX 6.5.x, Solaris (SPARC, INTE...
http://flickr.com/photos/sister_ray/3461372416 (CC-BY-NC)
Use: Good Company
Use: Software <ul><li>Most widely-used forums (phpBB, vBulletin)
Most widely-used CMSs (Drupal, Joomla!, ezPublish)
Most widely-used blogs (WordPress, Typo3, Serendipity)
Most widely-used wikis (MediaWiki, DokuWiki)
Most web-based e-mail (SquirrelMail, Roundcube, Kerio, Horde IMP) </li></ul>
Use: Web Slinger <ul><li>PHP was made for web sites </li><ul><li>Web server module (ISAPI) </li><ul><li>Runs in same memor...
CGI </li></ul><li>Widely adopted – most web hosting includes PHP and MySQL </li></ul>
Use: Tag Soup
Language: PHP in One Sentence &quot;What if C and Perl had a love child that Java babysat from time to time?&quot;
Language: Borrowed <ul><li>From Perl: </li><ul><li>String usage, type system, variable syntax, operators
PHP arrays appear to be a combination of Perl arrays and hashes </li></ul><li>From C:  (PHP is written in C, by the way) <...
Pass-by-reference syntax </li></ul><li>From Java: </li><ul><li>Class syntax, interfaces, exceptions </li></ul></ul>
Language: Features <ul><li>Dynamically and weakly typed
Interpreted </li><ul><li>Speed through bytecode caches </li></ul><li>Reflective </li><ul><li>Types, Names </li></ul><li>Bo...
Clone any object, serialize any object
Objects passed by reference
Arrays and primitives passed by value </li></ul>
Upcoming SlideShare
Loading in...5
×

PHP: The Beginning and the Zend

2,186

Published on

An introduction to PHP, covering topics from history of the platform and personalities involved, to strengths/weaknesses of the language and how to best use it.

Available under the Creative Commons Attribution Share-Alike Non-Commercial Unported 3.0 license.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,186
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Rasmus Lerdorf also has Canadian citizenship.
  • Andi Gutmans is of Swiss descent
  • What happens when your graphics people help with the back-end.
  • Transcript of "PHP: The Beginning and the Zend"

    1. 1. PHP: The Beginning and the Zend Presentation by Jonathan Hawk. Available under the Creative Commons Attribution Share-Alike Non-Commercial license.
    2. 2. History <ul><li>1994 – Started development
    3. 3. 1995-06-08 – PHP/FI
    4. 4. 1997-11-01 – PHP/FI 2
    5. 5. 1998-06-06 – PHP 3
    6. 6. 2000-05-22 – PHP 4 (powered by Zend Engine)
    7. 7. 2001-12-10 – PHP 4.1 (superglobals)
    8. 8. 2002-12-27 – PHP 4.3 (CLI)
    9. 9. 2004-07-13 – PHP 5 (powered by Zend Engine II)
    10. 10. 2009-06-30 – PHP 5.3 (namespaces, closures) </li></ul>http://upload.wikimedia.org/wikipedia/commons/a/ac/RasmuswJGang.jpg (public domain) Rasmus Lerdorf Joomla! Developers
    11. 11. Rasmus Lerdorf <ul><li>Twitter: @rasmus </li></ul>https://secure.wikimedia.org/wikipedia/commons/wiki/File:Rasmus_Lerdorf_cropped.jpg (CC-BY-SA)
    12. 12. http://www.flickr.com/photos/isthmene/4370546993 (CC-BY-NC)
    13. 13. Andi Gutmans & Zeev Suraski <ul><li>Twitter: @andigutmans/ @zeevs </li></ul>https://secure.wikimedia.org/wikipedia/commons/wiki/File:Andi_Gutmans_1.jpg (CC-BY) https://secure.wikimedia.org/wikipedia/commons/wiki/File:Zeev_Suraski_2005_cropped.jpg (CC-BY-SA)
    14. 14. http://www.flickr.com/photos/heyskinny/549085823 (CC-BY-NC)
    15. 15. Use: When? <ul><li>Web sites and Web applications </li><ul><li>Easy to learn* – finally your web designers can help with the back end!** </li><ul><li>* = also easy to screw up
    16. 16. ** = web designers should not help you with the back end </li></ul></ul><li>CLI scripts
    17. 17. GUI applications (PHP-GTK)
    18. 18. Available on Linux, Unix, Windows , Mac OS X, AS/400, Novell NetWare, OS/2, RISC OS, SGI IRIX 6.5.x, Solaris (SPARC, INTEL), Solaris OpenCSW packages </li></ul>
    19. 19. http://flickr.com/photos/sister_ray/3461372416 (CC-BY-NC)
    20. 20. Use: Good Company
    21. 21. Use: Software <ul><li>Most widely-used forums (phpBB, vBulletin)
    22. 22. Most widely-used CMSs (Drupal, Joomla!, ezPublish)
    23. 23. Most widely-used blogs (WordPress, Typo3, Serendipity)
    24. 24. Most widely-used wikis (MediaWiki, DokuWiki)
    25. 25. Most web-based e-mail (SquirrelMail, Roundcube, Kerio, Horde IMP) </li></ul>
    26. 26. Use: Web Slinger <ul><li>PHP was made for web sites </li><ul><li>Web server module (ISAPI) </li><ul><li>Runs in same memory space as web server </li></ul><li>Fast-CGI
    27. 27. CGI </li></ul><li>Widely adopted – most web hosting includes PHP and MySQL </li></ul>
    28. 28. Use: Tag Soup
    29. 29. Language: PHP in One Sentence &quot;What if C and Perl had a love child that Java babysat from time to time?&quot;
    30. 30. Language: Borrowed <ul><li>From Perl: </li><ul><li>String usage, type system, variable syntax, operators
    31. 31. PHP arrays appear to be a combination of Perl arrays and hashes </li></ul><li>From C: (PHP is written in C, by the way) </li><ul><li>Function names
    32. 32. Pass-by-reference syntax </li></ul><li>From Java: </li><ul><li>Class syntax, interfaces, exceptions </li></ul></ul>
    33. 33. Language: Features <ul><li>Dynamically and weakly typed
    34. 34. Interpreted </li><ul><li>Speed through bytecode caches </li></ul><li>Reflective </li><ul><li>Types, Names </li></ul><li>Both procedural and Object-oriented
    35. 35. Clone any object, serialize any object
    36. 36. Objects passed by reference
    37. 37. Arrays and primitives passed by value </li></ul>
    38. 38. Language: Typing <ul><li>Dynamic </li><ul><li>Variable types unnecessary, same variable can hold different types </li></ul><li>Weak </li><ul><li>0 == 0.0 == false == null == &quot;&quot; == array()
    39. 39. 1 == 1.0 == true == &quot;!empty&quot; == array('!empty') == $object
    40. 40. Methods expecting one type will convert from others </li><ul><li>&quot;1234&quot; will be converted to 1234.
    41. 41. &quot;foobar&quot; will be converted to 0. </li></ul></ul></ul>
    42. 42. Language: Classes <ul><li>Namespaces
    43. 43. Public/protected/private members
    44. 44. Superclasses and interfaces
    45. 45. Abstract and final classes
    46. 46. Constructors and destructors </li></ul>
    47. 47. Language: Class Example
    48. 48. Language: Methods <ul><li>Abstract, static, and final
    49. 49. Arguments </li><ul><li>Optionally type-hinted
    50. 50. &quot;Overloading&quot; </li></ul><li>No return types </li></ul>
    51. 51. Language: Methods Example
    52. 52. Language: Docblocks <ul><li>Docblocks often necessary for IDE code completion </li></ul>
    53. 53. http://www.flickr.com/photos/thebigdurian/374229490 (CC-BY-NC-SA) Strengths
    54. 54. Strengths <ul><li>Anonymous functions/closures
    55. 55. Variable method names
    56. 56. Magic methods
    57. 57. Arrays
    58. 58. Database connectivity
    59. 59. Date operations
    60. 60. Perl-Compatible Regular Expressions
    61. 61. Web-related stuff: file uploads, tag stripping, etc </li></ul>
    62. 62. Strengths: Closures
    63. 63. Strengths: Dynamic invocations
    64. 64. Strengths: Magic Methods
    65. 65. Strengths: Arrays
    66. 66. Strengths: Database Connectivity <ul><li>CUBRID *
    67. 67. dBase
    68. 68. DB++
    69. 69. FrontBase
    70. 70. filePro
    71. 71. Firebird/InterBase *
    72. 72. Informix *
    73. 73. IBM DB2 (Plus Cloudscape and Apache Derby) *
    74. 74. Ingres
    75. 75. MaxDB
    76. 76. Mongo </li></ul><ul><li>ODBC *
    77. 77. mSQL
    78. 78. Microsoft SQL Server *
    79. 79. MySQL/Mysqli/Mysqlnd *
    80. 80. Oracle OCI8 *
    81. 81. Ovrimos SQL
    82. 82. Paradox
    83. 83. PostgreSQL *
    84. 84. SQLite/SQLite3 *
    85. 85. Sybase *
    86. 86. tokyo_tyrant </li></ul>Bold = Built-in at compile time. * = PDO Driver available.
    87. 87. Strengths: Date Operations <ul><li>strtotime — Parses almost any date format </li><ul><li>&quot;+1 year&quot;
    88. 88. &quot;-3 weeks&quot;
    89. 89. &quot;Last wednesday&quot;
    90. 90. &quot;Tomorrow 6:12pm&quot;
    91. 91. &quot;2010-01-12T12:21:12+0500&quot;
    92. 92. &quot;Wed, Mar 2, 2011 3:00 pm&quot; </li></ul><li>&quot;date&quot; — displays dates </li></ul>
    93. 93. Strengths: PCRE
    94. 94. Strengths: Web stuff <ul><li>Superglobals: $_GET, $_POST, $_COOKIE, $_SESSION, $_FILE, $_SERVER, $_ENV
    95. 95. htmlspecialchars(), htmlentities(), strip_tags(), nl2br()
    96. 96. header(), setcookie() </li></ul>
    97. 97. http://www.flickr.com/photos/thetrouseredape/3267689296 (CC-BY-NC-SA) Weaknesses
    98. 98. Weaknesses: Language <ul><li>Inconsistent API </li><ul><li>in_array($needle, $haystack)
    99. 99. strpos($haystack, $needle) </li></ul><li>Unicode support*
    100. 100. Errors and Exceptions*
    101. 101. Extensions are hit-or-miss </li></ul>
    102. 102. Weaknesses: Scaling/Speed <ul><li>Overhead with single-request scope </li><ul><li>Move session storage to memory
    103. 103. In-memory cache (Memcached/APC)
    104. 104. Database
    105. 105. Clustered software (Zend Platform, etc.) </li></ul><li>Bytecode caching (APC, Xcache, etc.) </li></ul>
    106. 106. Weaknesses: Thread Safety <ul><li>Linux/Unix </li><ul><li>FastCGI
    107. 107. Non-thread safe </li></ul><li>Windows </li><ul><li>Most Windows libraries PHP uses are thread-safe
    108. 108. Recommends FastCGI, anyway </li></ul></ul>
    109. 109. PHP Personalities Andrei Zmievski (@a) PHP Core, PHP-GTK, Smarty Wez Furlong (@wezfurlong) PHP Core, PDO, PECL extensions Sebastian Bergmann (@s_bergmann) PHPUnit Derick Rethans (@derickr) PECL extensions, Xdebug Ilia Alshanetsky (@iliaa) PHP Core Matthew Weier O'Phinney (@weierophinney) Zend Framework
    110. 110. Where do you go? <ul><li>http://php.net
    111. 111. http://devzone.zend.com
    112. 112. http://www.planet-php.net
    113. 113. http://www.phparch.com </li></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×