PHP5.3
PHP5.4
PHP5.5
新增Finally关键字:http://www.laruence.com/2012/08/16/2709.html
新赠yield关键字,可以在方法中返回多个值所组成的数组
<?php function gen_one_to_three() { for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } } $generator = gen_one_to_three(); foreach ($generator as $value) { echo "$value\n"; } ?>
增加了opcache扩展
PHP5.6
PHP7
时间: 2024-10-03 22:29:12