3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class JsonSerializer { public static function serialize($value) { var_dump($value); } public function __call($method, $args) { if ('serialize' !== strtolower('serialize')) { throw new \BadMethodCallException('...'); } return self::serialize(...$args); } } $serializer = new JsonSerializer(); $serializer->serialize('foo'); JsonSerializer::serialize('bar');
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.1
string(3) "foo" string(3) "bar"