3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct(private string $value) {} public function __destruct() { var_dump($this->value); } } function test() { $a = new Foo('a'); $b = new Foo('b'); $c = new Foo('c'); print "Destructor order:\n"; } test();

preferences:
54.99 ms | 402 KiB | 5 Q