1--TEST-- 2Using an integer as a static property name 3--FILE-- 4<?php 5 6class Foo { 7 public static $bar = 42; 8} 9 10$n = 42; 11 12${42} = 24; 13var_dump(${42}); 14var_dump(${(int) 42}); 15var_dump(${(int) $n}); 16 17try { 18 var_dump(Foo::${42}); 19} catch (Error $e) { 20 echo $e->getMessage(), "\n"; 21} 22 23try { 24 var_dump(Foo::${(int) 42}); 25} catch (Error $e) { 26 echo $e->getMessage(), "\n"; 27} 28 29try { 30 var_dump(Foo::${(int) $n}); 31} catch (Error $e) { 32 echo $e->getMessage(), "\n"; 33} 34 35?> 36--EXPECT-- 37int(24) 38int(24) 39int(24) 40Access to undeclared static property: Foo::$42 41Access to undeclared static property: Foo::$42 42Access to undeclared static property: Foo::$42 43 44