3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $classes = get_declared_classes(); foreach($classes as $class) { $methods = get_class_methods($class); foreach($methods as $method) { if (in_array($method, array('__construct', '__destruct', '__call', '__callStatic', '__get', '__set', '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', '__set_state', '__clone'))) { printf("%s::%s\n", $class, $method); } require_once($class); $functions = get_defined_functions(); $functions_list = array(); foreach($functions['user'] as $func) { $f = new ReflectionFunction($func); $args = array(); foreach($f->getParameters() as $param) { $tmparg = ''; if ($param->isPassedByReference()) $tmparg = '&'; if ($param->isOptional()) { $tmparg = '[' . $tmparg . '$' . $param->getName() . ' = ' . $param->getDefaultValue() . ']'; } else { $tmparg.= '&' . $param->getName(); } $args[] = $tmparg; unset($tmparg); } printf("function %s ( %s ){[###]...[###]}\n", $func, implode(', ', $args)); } } }
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Exception::__construct Warning: require_once(Exception): failed to open stream: No such file or directory in /in/1DRPd on line 9 Fatal error: require_once(): Failed opening required 'Exception' (include_path='.:') in /in/1DRPd on line 9
Process exited with code 255.
Output for hhvm-3.12.0
HH\Set::__construct Fatal error: File not found: HH\Set in /in/1DRPd on line 9
Process exited with code 255.
Output for hhvm-3.10.0
SimpleXMLIterator::__construct Fatal error: File not found: SimpleXMLIterator in /in/1DRPd on line 9
Process exited with code 255.
Output for 5.0.3 - 5.0.5
Exception::__construct Warning: main(Exception): failed to open stream: No such file or directory in /in/1DRPd on line 9 Fatal error: main(): Failed opening required 'Exception' (include_path='.:') in /in/1DRPd on line 9
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Exception::__clone Warning: main(Exception): failed to open stream: No such file or directory in /in/1DRPd on line 9 Fatal error: main(): Failed opening required 'Exception' (include_path='.:') in /in/1DRPd on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: main(Directory): failed to open stream: No such file or directory in /in/1DRPd on line 9 Fatal error: main(): Failed opening required 'Directory' (include_path='.:') in /in/1DRPd on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(Directory) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/1DRPd on line 9 Fatal error: main() [http://www.php.net/function.main]: Failed opening required 'Directory' (include_path='.:') in /in/1DRPd on line 9