我想知道是否有人知道Facebook的Hiphop库中不支持
PHP 5.4中的哪些功能.关于Hiphop github wiki有一些问题,例如
this一个,非常隐约地说:
HipHop does not currently support all PHP 5.4 features.
目前我只是假设,出于工作目的,所有新功能都不兼容,因为没有指定工作,如果有人对此有任何见解,这将是伟大的,提前感谢.
远离以下方面:
特质宣言:
- trait vehicleInfo {
- function getSpeed() { /*1*/ }
- function getWheels() { /*2*/ }
- }
- class Car extends Vehicle {
- use vehicleInfo;
- /* ... */
- }
- class Motorcycle extends Vehicle {
- use vehicleInfo;
- /* ... */
- }
PHP 5.4阵列实例化:
- $array = [
- "name" => "John Smith","job" => "Basketweaver",];
函数数组解除引用:
- function small_numbers() {
- return array (0,1,2);
- }
- echo small_numbers()[0];
实例化的类成员访问:
- (new Foo)->bar();