3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class HttpStatus { public static $ABC = 'abc'; public static $DEF = 'def'; } $abd = 'ABC'; $def = 'DEF'; echo HttpStatus::$abc; echo HttpStatus::${'ABC'};
based on mjeH9
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: HttpStatus::$abc in /in/bQfQK:12 Stack trace: #0 {main} thrown in /in/bQfQK on line 12
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Access to undeclared static property: HttpStatus::$abc in /in/bQfQK on line 12
Process exited with code 255.