3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Car{ public static function a(){ return 'hi'; } } class Constants{ public static $use='Car'; } $trim = 'trim'; echo "${Constants::$use}"::a();
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in /in/1hG90 on line 12
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /in/UXnOj on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /in/1hG90 on line 12
Process exited with code 255.