33
20 years of PHP Kristian Köhntopp Old Fart [email protected] Image: © 2006 Kristian Köhntopp

20 Years of PHP

Embed Size (px)

Citation preview

Page 1: 20 Years of PHP

20 years of PHPKristian Köhntopp

Old Fart

[email protected]

Image: © 2006 Kristian Köhntopp

Page 2: 20 Years of PHP

Thanks, Rasmus!© 2006 Kristian Köhntopp

Page 3: 20 Years of PHP

“Unmitigated sucess!”"One For the Suits" by Michael Cooper - Flickr. Licensed under CC BY 2.0 via Commons - https://commons.wikimedia.org/wiki/File:One_For_the_Suits.jpg#/media/File:One_For_the_Suits.jpg

Page 4: 20 Years of PHP

Easy to learn. Too easy?

Page 5: 20 Years of PHP

Documentation + User Contributionhttp://php.net

Page 6: 20 Years of PHP

Logos are trademarks of their respective owners

Page 7: 20 Years of PHP

PHP: not elegant, but complete…

via http://memory-alpha.wikia.com/wiki/Unnamed_Borg_cubes

Page 8: 20 Years of PHP

Lots of history: Let’s have a look…© 2006 Kristian Köhntopp

Page 9: 20 Years of PHP

The very beginning…

Page 10: 20 Years of PHP

Not even a language

Page 11: 20 Years of PHP

PHP/FI (PHP 2, April 1996)

Page 12: 20 Years of PHP

The first real PHP…http://grokbase.com/t/php/php-version3/9866666bqf/php3-php-3-0-release-announcement

Page 13: 20 Years of PHP

PHP 3

• Rasmus Lerdorf

• Zeev Suraski, Andi Gutmans (new parser)

• Stig Bakken (Oracle, SGML, Manual, …)

• Shane Caraveo (Windows Support)

• Jim Winstead (various modules and infrastructure)

13

Page 14: 20 Years of PHP

PHPLIB initial release announcementhttp://marc.info/?l=php-general&m=90222503034131&w=2

Page 15: 20 Years of PHP

serialize()

Page 16: 20 Years of PHP

Zend Engine

• PHP 3: no bytecode, bad object orientation, good module support

• Zend Engine: bytecode, much better SAPI support, output buffering, native sessions (Sascha Schumann!)

• PHP 4: May 2000, based on Zend Engine

16

Page 17: 20 Years of PHP

Around the same time…

Page 18: 20 Years of PHP

PHP-Kongress, 2000

Page 19: 20 Years of PHP

de.comp.lang.php (2000-Jan-01)

Page 20: 20 Years of PHP

dclp FAQ

Page 21: 20 Years of PHP

PHP 5 - release announcement and problems

Page 22: 20 Years of PHP

PHP 5 Adoption22

Page 23: 20 Years of PHP

Constructors

• Originally:

• Class A { function A() { … }; function C() { … }; }

• Class B extends A { function B() { … }; }

• Class C extends A { … }

• namespace D;class E { function E() { … }; } // Change: 5.3.3

23

Page 24: 20 Years of PHP

Language Design is extremely hard

Page 25: 20 Years of PHP

But check http://phpsadness.com/ for better criticism

Page 26: 20 Years of PHP

Bad Ideas

• “Pages”

• making files accessible and executable

• no input filters, no framework, no application

• better:

• “Request-Routers”, “defined outer application boundary”

26

Page 27: 20 Years of PHP

Bad Ideas

• Automatic request parameter imports

• Still ext/filter is optional, and a joke.

• Automatic request parameter quotes

• Magic Quotes

27

Page 28: 20 Years of PHP

Bad Ideas

• Automatic remote access: URL wrappers

• Security; Redirect control

• Timeout and error handling

28

Page 29: 20 Years of PHP

Bad Ideas

• Language magic

• Octal and hex number prefixes

• “@“ operator

• Type magic

• Silent type promotion; “===“; silent variable creation

29

Page 30: 20 Years of PHP

Bad Ideas

• Switches and modes for behavior

• short_open, magic_quotes, safe_mode, …

• Oh, and optional static typing…

30

Page 31: 20 Years of PHP

Antipattern: “Java Envy”

Page 32: 20 Years of PHP

“Things that have no name”

• Lack of papers about PHP best practices

• Common set of best practices, with local variations, but no “discussion”

32

© 2006 Kristian Köhntopp

Page 33: 20 Years of PHP

Community is important.https://lh6.googleusercontent.com/-5fqzZbTaEz4/VFJ1Cts9dvI/AAAAAAAAB5c/YsEQUoqaq6k/s0/happy%2Bphp%2Bfamily.jpg via https://plus.google.com/+Getelephpantcom/posts