3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $count = 0; public function bar() { if (false) { return; } $this->count++; var_dump($this->count); } } class TotallyUnrelated { public function go() { Foo::bar(); } } (new TotallyUnrelated)->go();

preferences:
42.4 ms | 2026 KiB | 5 Q