3v4l.org

run code in 300+ PHP versions simultaneously
<?php $generator = (function (): iterable { yield 5; throw new \Exception(sprintf('%f', microtime(true))); })(); try { foreach ($generator as $val) {} } catch (\Throwable $e) { $reflection = new \ReflectionGenerator($generator); var_dump($reflection->getTrace()); }
Output for git.master_jit, git.master
Fatal error: Uncaught ReflectionException: Cannot fetch information from a closed Generator in /in/iPCem:12 Stack trace: #0 /in/iPCem(12): ReflectionGenerator->getTrace() #1 {main} thrown in /in/iPCem on line 12
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:
49.8 ms | 405 KiB | 5 Q