3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Text { protected $text; public function __construct(void $text) { $this->text = $text; } public function hello() { return $this->text; } } var_dump((new Text(1))->hello());

preferences:
48.32 ms | 402 KiB | 5 Q