Home >Backend Development >PHP Tutorial >Traits usage
[php] view plaincopy
[php] view plaincopy
[php] view plaincopy
Added short array syntax support ([1,2,3]), see UPGRADING guide for full details. Added binary numbers format (0b001010). Added support for Class::{expr}() syntax. Added support for Traits.//本文的主要内容 Added closure $this support back. Added array dereferencing support.//数组解引用支持,上文中有实例 Added callable typehint. Added indirect method call through array. #47160. Added DTrace support.//传说DTrace是一个性能分析工具,可以跟踪出函数调用点,返回点等数据 Added class member access on instantiation (e.g. (new foo)->bar()) support.//类新实例解引用操作,上文中有实例
以上就介绍了Traits的用法,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。