3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThingDoer { protected $things; public function __construct(string $string = NULL, int $int = null, Throwable $throwable = NULL) { $this->things[] = $string; $this->things[] = intval($int); $this->things[] = $throwable; } public function do_thing() { print_r($this->things); } } $thing = new ThingDoer(); $thing->do_thing();

preferences:
32.87 ms | 402 KiB | 5 Q