Upload
kristian-koehntopp
View
1.004
Download
0
Embed Size (px)
Citation preview
Thanks, Rasmus!© 2006 Kristian Köhntopp
“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
Easy to learn. Too easy?
Documentation + User Contributionhttp://php.net
Logos are trademarks of their respective owners
PHP: not elegant, but complete…
via http://memory-alpha.wikia.com/wiki/Unnamed_Borg_cubes
Lots of history: Let’s have a look…© 2006 Kristian Köhntopp
The very beginning…
Not even a language
PHP/FI (PHP 2, April 1996)
The first real PHP…http://grokbase.com/t/php/php-version3/9866666bqf/php3-php-3-0-release-announcement
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
PHPLIB initial release announcementhttp://marc.info/?l=php-general&m=90222503034131&w=2
serialize()
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
Around the same time…
PHP-Kongress, 2000
de.comp.lang.php (2000-Jan-01)
dclp FAQ
PHP 5 - release announcement and problems
PHP 5 Adoption22
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
Language Design is extremely hard
But check http://phpsadness.com/ for better criticism
Bad Ideas
• “Pages”
• making files accessible and executable
• no input filters, no framework, no application
• better:
• “Request-Routers”, “defined outer application boundary”
26
Bad Ideas
• Automatic request parameter imports
• Still ext/filter is optional, and a joke.
• Automatic request parameter quotes
• Magic Quotes
27
Bad Ideas
• Automatic remote access: URL wrappers
• Security; Redirect control
• Timeout and error handling
28
Bad Ideas
• Language magic
• Octal and hex number prefixes
• “@“ operator
• Type magic
• Silent type promotion; “===“; silent variable creation
29
Bad Ideas
• Switches and modes for behavior
• short_open, magic_quotes, safe_mode, …
• Oh, and optional static typing…
30
Antipattern: “Java Envy”
“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
Community is important.https://lh6.googleusercontent.com/-5fqzZbTaEz4/VFJ1Cts9dvI/AAAAAAAAB5c/YsEQUoqaq6k/s0/happy%2Bphp%2Bfamily.jpg via https://plus.google.com/+Getelephpantcom/posts