3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; public function __construct($bar) { $this->bar = $bar; } public function bar() { return $this->bar; } } $foo = new Foo(); var_dump($foo->bar());

preferences:
58.12 ms | 404 KiB | 5 Q