3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /** * ClassDocComment * * @copyright Copyright (c) 2011 * @author author * @see http://php.net */ class ClassDocComment { } echo (new ReflectionClass ('ClassDocComment'))->getDocComment(); var_dump ((string) new ClassDocComment);
based on WIOTG
Output for 7.1.0 - 7.2.0
/** * ClassDocComment * * @copyright Copyright (c) 2011 * @author author * @see http://php.net */ Recoverable fatal error: Object of class ClassDocComment could not be converted to string in /in/fZeCf on line 15
Process exited with code 255.
Output for 5.4.12 - 7.0.20
/** * ClassDocComment * * @copyright Copyright (c) 2011 * @author author * @see http://php.net */ Catchable fatal error: Object of class ClassDocComment could not be converted to string in /in/fZeCf on line 15
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/fZeCf on line 14
Process exited with code 255.