PHP 7 has been released! During the PHP 7 Release Party in Antwerp I gave a presentation on "What's new in PHP 7?" to highlight the new features, the removed features and what to expect in terms of performance.
return array_sum($ints); } var_dump(sumOfInts(2, '3', 4.1)); // Outputs PHP Fatal error: Uncaught TypeError: Argument 2 passed to sumOf must be of the type integer, string given, called in test2.php o line 10 and defined in test2.php:5 Stack trace: #0 test2.php(10): sumOfInts(2, '3', 4.1) #1 {main}
+ $b; } // Result is a fatal error, float vs integer mismatch var_dump(sum(1, 2.5)); PHP Fatal error: Uncaught TypeError: Return value of sum() must be of the type integer, float returned in test3.php: Stack trace: #0 test3.php(11): sum(1, 2.5) #1 {main}
applies to function calls, not to the functions declarations (so: if de ned in test.php, all function calls made from test.php have strict typing) Integers are allowed for functions requiring oat
removed (mysqli / pdo only from now on) php.ini: removed "#" comments, only ";" from now on Removed asp_tags: <% ... %> Finally removed ereg() (deprecated since 5.3) preg_replace() no longer supports "\e"
Wordpress, no tweaks or con g changes $ ab -c 1 -n 100 http://site/wordpress PHP 7.0: 12.9req/s (75ms per request) PHP 5.6: 8.9 req/s (120ms per request) PHP 5.5: 2.5 req/s (450ms per request)