3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i='4N4P9N7P1N1P2N2P'; preg_match_all('/(\d+)(\w)/', $i, $m); //print_r($m); foreach($m as $p) { if ($p[2]=='N') { $o.=str_repeat('=',$p[1]); } else { $o.=str_repeat('- ',(int)($p[1]/2)).($p%2?'-':''); } } echo(PREG_SET_ORDER); echo($o);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: A non-numeric value encountered in /in/3ofjm on line 10 Fatal error: Uncaught TypeError: Unsupported operand types: array % int in /in/3ofjm:10 Stack trace: #0 {main} thrown in /in/3ofjm on line 10
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:
50.07 ms | 401 KiB | 8 Q