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", '3) ', var_export(assert('is_subclass_of($class, "\\Exception")'), true), "\n", '4) ', var_export(assert('is_subclass_of("\\foo\\MyException", "\\Exception")'), true), "\n",;
Output for 5.3.0 - 5.5.12
Parse error: syntax error, unexpected ';' in /in/L7b2u on line 13
Process exited with code 255.