3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ public function pub() { $cool = $this->priv(); return $cool + 5; } private function priv() { return 5; } } $newb = new test; var_dump($newb->pub()); echo $newb->priv();

preferences:
47.69 ms | 402 KiB | 5 Q