3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class A{ protected $stuff; function __construct($foo){ if(!is_float($foo)) throw new TypeError; $this->stuff = $foo; } static function __set_state($data){ return new A($data['stuff']); } } $x = new A(0.0); eval('$y = ' . var_export($x, true) . ';');

preferences:
75.35 ms | 402 KiB | 5 Q