3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static function hello(){ echo "Hello World\n"; } } $y[0] = 'hello'; echo "A::${'y'}[0]"; // echo A::${'y'}[0];
based on 5JEhs
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/YSYUq on line 11 A::Array[0] Fatal error: Uncaught Error: Access to undeclared static property: A::$y in /in/YSYUq:12 Stack trace: #0 {main} thrown in /in/YSYUq on line 12
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Notice: Array to string conversion in /in/YSYUq on line 11 A::Array[0] Fatal error: Access to undeclared static property: A::$y in /in/YSYUq on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
A::Array[0] Fatal error: Access to undeclared static property: A::$y in /in/YSYUq on line 12
Process exited with code 255.