PHP 5.3,你准备好了吗?August 4, 2008
官方于 8 月 1 日推出了 PHP 5.3 的首个 aplha 版本,相比期前的例行版本升级,此次的更新有更为重要的意义。
根据描述,主要的改进内容如下
- Namespaces (documentation maybe out dated)
- Late static binding and __callStatic
- Lambda functions and closures
- Addition of the intl, phar (phar is scheduled for some more work a head of alpha2), fileinfo and sqlite3 extensions
- Optional cyclic garbage collection
- Optional support for the MySQLnd replacement driver for libmysql
- Windows older than Windows 2000 (Windows 98, NT4, etc.) are not supported anymore (details)
- New syntax features like NOWDOC, limited GOTO, ternary short cut "?:"
是的,可以看见很多计划在 PHP6 实现的功能,都“提前”到了 PHP 5.3 中。
个人认为最为重要的是新加入的 Namespaces(命名空间)、Lambda 、以及 closures(闭包) 等特性。有了这些新的特性,我们这些思维已经“僵化”的 coder 又能玩出新的花样了。
接下来的几天,我会撰写几篇有关 PHP 新特性相关的摘记,请期待(但愿不是放“空头支票”)。
期待~~
期待~~~~
我等~~~~