3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Char; class Character { public function __construct($id = null) { } } $name = 'Char\Character'; $arguments = array(); $reflect = new \ReflectionClass($name); print_r($reflect); print_r($name); print_r($arguments); $o = $reflect->newInstanceArgs($arguments);
Output for 5.3.7 - 5.6.28, 7.0.0 - 7.1.0
ReflectionClass Object ( [name] => Char\Character ) Char\CharacterArray ( )
Output for hhvm-3.10.0 - 3.12.0
ReflectionClass Object ( [name] => Char\Character [obj:ReflectionClass:private] => ) Char\CharacterArray ( )