3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo implements \JsonSerializable { public function jsonSerialize() { return new self; } } var_dump(json_encode(new Foo));
based on PQj2L