内容简介:Swoole 在在最新的现在
Swoole 在 1.x - 4.x
版本中同时提供了 PSR-0
规范的下划线风格类名和 PSR-4
的命名空间风格。目前 PSR-0
规范已于 2014年10月21日
被标记为弃用,目前最新的替代规范为 PSR-4
。
在最新的 5
版本中我们计划 彻底移除下划线类名
。请各位 Swoole
用户逐步将类名改为 PSR-4
规范的纯命名空间风格。
现在 Swoole
正在逐渐重构移除陈旧落后的设计,未来会变得越来越精致。
正确
$server = new Swoole\Http\Server; $server = new Swoole\Server; $client = new Swoole\Coroutine\Http\Client; $client = new Co\Http\Client;
错误
$server = new Swoole_Http_Server; $server = new Swoole_Server; $client = new Swoole_Coroutine_Http_Client; $client = new Co_Http_Client;
在 5.0
版本中将不再支持下划线类名,使用了上述风格代码的 PHP
会报类不存在的致命错误
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- Swoole 5.0 不再使用 PSR-0 下划线风格的类名
- 通过类名动态生成对象
- CSS 类名的问题
- t-io 3.0.1 发布:换了三个类名,请务必关注修改日志
- Go语言 “ _ ”(下划线)
- 文字悬停下划线动画效果集合
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Programming in Haskell
Graham Hutton / Cambridge University Press / 2007-1-18 / GBP 34.99
Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduc......一起来看看 《Programming in Haskell》 这本书的介绍吧!