3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace foo; class MyException extends \Exception {} $class = '\\foo\\MyException'; echo "$class\n", '1) ', var_export(is_subclass_of($class, '\\Exception'), true), "\n", '2) ', var_export(is_subclass_of('\\foo\\MyException", "\\Exception"), true), "\n";
Output for 5.5.0 - 5.5.12
Parse error: syntax error, unexpected ''\\foo\\MyException", "\\Excep' (T_ENCAPSED_AND_WHITESPACE) in /in/FNS82 on line 11
Process exited with code 255.
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected ''\\foo\\MyException", "\\Excep' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/FNS82 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/FNS82 on line 11
Process exited with code 255.