1--TEST-- 2Test to ensure semi reserved words allow deference 3--FILE-- 4<?php 5 6class Foo { 7 const use = 'yay'; 8 9 public static function new() { 10 echo __METHOD__, PHP_EOL; 11 return new static(); 12 } 13 14 public function self() { 15 echo __METHOD__, PHP_EOL; 16 return $this; 17 } 18} 19 20Foo::new()::new()::new(); 21 22var_dump( 23 (new Foo)->self()::new()->self()->self()::use 24); 25 26Foo::{'new'}(); 27 28var_dump(Foo::use); 29 30echo "\nDone\n"; 31?> 32--EXPECT-- 33Foo::new 34Foo::new 35Foo::new 36Foo::self 37Foo::new 38Foo::self 39Foo::self 40string(3) "yay" 41Foo::new 42string(3) "yay" 43 44Done 45