3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private array $array = [['value' => 'Test']]; public function getValue() { return $this->array; } public function doSomething() { return array_map(fn($x) => $x ?? null, ...$this->getValue())['value'] ?? null; } } print_r((new Foo)->doSomething());

preferences:
31.75 ms | 405 KiB | 5 Q