3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A1 { protected function a () { $i =0 ; while (true) { $i++; if ($i > 10000) { break; } foreach ([['a' => 1],2, ['a' => 2]] as $p) { if ($p == 2) { continue; } yield $p['a'] => 123; } } } public function b(){ $sum = 0; foreach ( a() as $k => $v ) { $sum += $k + $v; } echo 'Done: ', $sum; } } (new A1)->b();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function a() in /in/Y6MHM:18 Stack trace: #0 /in/Y6MHM(24): A1->b() #1 {main} thrown in /in/Y6MHM on line 18
Process exited with code 255.

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:
57.42 ms | 401 KiB | 8 Q