3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $testy; function __construct($input) { $this->testy = $input; } public function doSomething() { return $this->testy * mt_rand(); } } $obj = new Test(1); echo $obj->doSomething();

preferences:
36.23 ms | 402 KiB | 5 Q