3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new ReflectionClass(SimpleXmlElement::class); var_dump($->getInterfaces());
Output for 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting variable (T_VARIABLE) or '$' in /in/qpD7d on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/qpD7d on line 4
Process exited with code 255.

preferences:
178.1 ms | 1399 KiB | 67 Q