3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld { public function __toString() { return serialize($this); } } $reflectionMethod = new ReflectionMethod('HelloWorld', '__toString'); echo $reflectionMethod->invokeArgs(new HelloWorld(), array()); ?>

preferences:
35.04 ms | 402 KiB | 5 Q