3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooNoMoreException extends Exception {} class Foo { protected $count = 500; public function step() { if (!$this->count) { throw new FooNoMoreException('No more steps to take.'); } $this->count--; $this->addStep(); } public function addStep() { $this->count++; } } // This one $f = new Foo; try { while ($f->step() || true) {} } catch (FooNoMoreException $e) {} var_dump($f); // Or this one $d = new Foo; while (1) { try { $d->step(); } catch (FooNoMoreException $e) { break; } } var_dump($d);
Output for git.master, git.master_jit, rfc.property-hooks

Process exited with code 137.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.58 ms | 401 KiB | 8 Q