3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Char; class Character { public function __construct($id = null) { } } $name = 'Character'; $arguments = array(); $reflect = new ReflectionClass($name); print_r($reflect); print_r($name); print_r($arguments); $o = $reflect->newInstanceArgs($arguments);
Output for 7.0.0 - 7.3.1
Fatal error: Uncaught Error: Class 'Char\ReflectionClass' not found in /in/MJIqj:16 Stack trace: #0 {main} thrown in /in/MJIqj on line 16
Process exited with code 255.
Output for 5.3.7 - 5.6.28
Fatal error: Class 'Char\ReflectionClass' not found in /in/MJIqj on line 16
Process exited with code 255.