3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { private $a; private $b; public function __construct($a = null, $b = null) { $this->a = $a; $this->b = $b; } public function doSomethingWithA() { /**/ } public function doSomethingWithB() { /**/ } } $c = new C("foo"); assert($c->a === "foo");

preferences:
56.2 ms | 402 KiB | 5 Q