3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new ReflectionClass(IntlChar::CLASS); foreach($x->getMethods as $method); echo $method . "\n";
based on LalmV
Output for 7.0.0 - 7.0.4, 7.0.6 - 7.2.0
Notice: Undefined property: ReflectionClass::$getMethods in /in/tRT6Q on line 4 Warning: Invalid argument supplied for foreach() in /in/tRT6Q on line 4 Notice: Undefined variable: method in /in/tRT6Q on line 5
Output for 7.0.5
Fatal error: Uncaught ReflectionException: Class IntlChar does not exist in /in/tRT6Q:3 Stack trace: #0 /in/tRT6Q(3): ReflectionClass->__construct('IntlChar') #1 {main} thrown in /in/tRT6Q on line 3
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Class IntlChar does not exist' in /in/tRT6Q:3 Stack trace: #0 /in/tRT6Q(3): ReflectionClass->__construct('IntlChar') #1 {main} thrown in /in/tRT6Q on line 3
Process exited with code 255.
Output for 5.4.9 - 5.4.45
Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/tRT6Q on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /in/tRT6Q on line 3
Process exited with code 255.