The State of PHP 2014
James Titcumb
Portsmouth Linux User Group
21st June 2014
James Titcumb
www.jamestitcumb.com
www.protected.co.uk
www.phphants.co.uk
@asgrim
Who is this guy?
Who are you?
A brief history...
1994-1995 - PHP/FI 1.0
● Basic functionality
● Solved a problem
● Simpler than Perl
http://en.wikipedia.org/wiki/File:Rasmus_Lerdorf_cropped.jpg
1997 - PHP 3
● Rewrote parser
● Zend Technologies
http://en.wikipedia.org/wiki/File:Zeev_Suraski_2005_cropped.jpg
http://en.wikipedia.org/wiki/File:Andi_Gutmans_1.jpg
2000 - PHP 4
● Zend Engine 1.0
● Big improvements
● Very basic “OO”
2004 - PHP 5
● Zend Engine 2.0
● Better OO
● PDO
● Performance increase
● Adoption slow…
So… what is PHP?
What is PHP?
1
2
3
4
<?php
echo "Hello world";
From “Hello World”...
<?php
echo "Hello, " . $_GET['name'];
From “Hello World”...
… to Facebook
https://twitter.com/feross/status/459259593630433280
PHP powers
82%of the web
Source: http://w3techs.com/technologies/overview/programming_language/all
Who uses PHP...
The Hate
● http://phpsadness.com/
● http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
● http://blog.codinghorror.com/the-php-singularity/
● http://webonastick.com/php.html
● http://aurelio.audero.it/blog/2014/02/05/why-people-think-php-sucks/
● https://maurus.net/resources/programming-languages/php/
● http://www.bitstorm.org/edwin/en/php/
● https://teamtreehouse.com/forum/why-php-sucks
● http://www.reddit.com/r/PHP/.../why_do_so_many_developers_hate_php/
● http://www.quora.com/.../Is-PHP-a-badly-designed-programming-language
● etc.
Some People Don’t Like PHP
Some reasons...
Some reasons...
● Was not “designed”
Some reasons...
● Was not “designed”
● Many inconsistencies
○ in_array($needle, $haystack)
○ strstr($haystack, $needle)
○ htmlentities() … html_entity_decode()
Some reasons...
● Was not “designed”
● Many inconsistencies
● Loosely typed
○ int foo = 0;
○ $foo = 0;
Some reasons...
● Was not “designed”
● Many inconsistencies
● Loosely typed
● Seen as “amateur”
Some reasons...
● Was not “designed”
● Many inconsistencies
● Loosely typed
● Seen as “amateur”
● T_PAAMAYIM_NEKUDOTAYIM
Some reasons...
● Was not “designed”
● Many inconsistencies
● Loosely typed
● Seen as “amateur”
● T_PAAMAYIM_NEKUDOTAYIM
● php.internals
Haters gonna hate.
So…
● Use the right tool
● Use what is comfortable
● If you like using PHP, ignore the hate
What made PHP work?
● Easy to learn
Why it works...
● Easy to learn
● Loosely typed
Why it works...
● Easy to learn
● Loosely typed
● Easy to install
Why it works...
● Easy to learn
● Loosely typed
● Easy to install
● Rise of the CMS
Why it works...
● Easy to learn
● Loosely typed
● Easy to install
● Rise of the CMS
● Gets the job done
Why it works...
Then it all changed...
Rob Allen: https://www.flickr.com/photos/akrabat/54795045
● PHP 5.3 features
PHP keeps getting MORE awesome
● PHP 5.3 features
● PHP 5.4 + 5.5 features
PHP keeps getting MORE awesome
● PHP 5.3 features
● PHP 5.4 + 5.5 features
● PHP-FIG
PHP keeps getting MORE awesome
● PHP 5.3 features
● PHP 5.4 + 5.5 features
● PHP-FIG
● Rise of the community
PHP keeps getting MORE awesome
● PHP 5.3 features
● PHP 5.4 + 5.5 features
● PHP-FIG
● Rise of the community
● Composer
PHP keeps getting MORE awesome
The Future of PHP…?
Things to look out for...
● HHVM
Things to look out for...
● HHVM
● Zephir
Things to look out for...
● HHVM
● Zephir
● PHPNG
Things to look out for...
● HHVM
● Zephir
● PHPNG
● Growing community!
Things to look out for...
Unstoppable Train
http://unsplash.com/post/71169964532/download-by-kholodnitskiy-maksim
Questions?
James Titcumb
www.jamestitcumb.com
www.protected.co.uk
www.phphants.co.uk
@asgrim
Thanks for watching!

The State of PHP 2014 - Portsmouth Linux User Group (6th June 2014)