It is a presentation about basic pros and cons of PHP. I tried to figure out why so hated language is still a popular choice for web development and over 80% of web is powered by it.
7. • http://webonastick.com/php.html
• http://phpsadness.com/
• http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
• http://whydoesitsuck.com/why-does-php-suck/
• http://pythonhaspower.com/posts/2014/06/php-i-python-biznesowe-por
%C3%B3wnanie-budowy-aplikacji/
And many more…
B A D O P I N I O N
/297
8. (bool) „true” => true
(bool) „1” => true
(bool) 1 => true
(bool) -1 => true
(bool) 0 => false
(bool) „” => false
(bool) array() => ?
(bool) „false” => ?
(bool) „0” => ?
I N C O N S I S T E N C Y - B O O L E A N S
/298
9. (bool) „true” => true
(bool) „1” => true
(bool) 1 => true
(bool) -1 => true
(bool) 0 => false
(bool) „” => false
(bool) array() => false
(bool) „false” => true
(bool) „0” => false
I N C O N S I S T E N C Y - B O O L E A N S
/299
http://php.net/manual/en/language.types.boolean.php
10. I N C O N S I S T E N C Y - D O C S
/2910
http://php.net/manual/en/class.datetime.php http://php.net/manual/pl/class.datetime.php
14. L E T ’ S FA C E T H E T R U T H
facebook.com
baidu.com
wikipedia.org
twitter.com
/2914
http://w3techs.com/technologies/details/pl-php/all/all
http://w3techs.com/technologies/overview/programming_language/all
19. C O M M U N I T Y
MIT
Open Source
Packagist
Composer
/2919
20. PA C K A G I S T - S TAT I S T I C S
/2920
https://packagist.org/statistics
21. E A S Y T O U S E !
Fast to set up
Good even for complicated projects
Flexible
/2921
22. P H P S P E C - M A G I C A L F L E X I B I L I T Y
function it_calculates_tax_as_percentage_of_given_base (
TaxRateInterface $rate
) {
$rate->getAmount()->willReturn(0.23);
$this->calculate(10000, $rate)->shouldReturn(2300);
}
/2922
25. W H AT ’ S N E W O R W H AT ’ S B E T T E R
• Performance
• Exceptions on fatals
• Scalar typehints
• Return typehints
• Removal of many deprecated features
/2925
And much more…
http://talks.php.net/fluent15#/php7
26. P E R F O R M A N C E
/2926
http://talks.php.net/fluent15#/wpbench
http://talks.php.net/fluent15#/drupalbench
27. – A L M U A L I M
„You are not free to do what you want”
/2927