Blogs of C.K.Young

博客园 联系 订阅 管理

PHP5.3

①Added "?:" operator ( 添加了?:操作符)

指的是三元运算符可以简写:

$x = true;
$rs = $x?:false;//$x?$x:false;

②Added lambda functions and closures

(增加了匿名函数和闭包)

③Added support for namespaces

(增加了命名空间的支持)

 

PHP5.4

①Added short array syntax support (添加了短数组语法的支持。)

数组可以像js那样写了[1,2,3]

②Added array dereferencing support.(添加了数组的延迟支持)

数组立即调用

③Added class member access on instantiation support

(对象也可以立即调用  e.g. (new foo)->bar() )

④<?= is now always available regardless of the short_open_tag_setting

(短标签的支持<h1><?=$title?></h1>)

⑤Added binary numbers format (0b001010)

增加二进制表示

⑥Added support for Traits

 

PHP5.5...未完待续...

posted on 2016-09-04 21:35  C.K.Young  阅读(788)  评论(0编辑  收藏  举报