3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expression = 'A1 B2 - C3 + D4 / E5 / E6 C3 / A5'; do { $expression = preg_replace_callback( '~(.*?)([A-Z0-9]{2}(?: / [A-Z0-9]{2})+)(.*)~', fn($m) => implode( "\n", array_map( fn($v) => "{$m[1]}$v{$m[3]}", explode(' / ', $m[2]), ) ), $expression, 1, $count ); } while($count); echo $expression;
Output for git.master, git.master_jit, rfc.property-hooks
A1 B2 - C3 + D4 C3 A1 B2 - C3 + D4 A5 A1 B2 - C3 + E5 C3 A1 B2 - C3 + E5 A5 A1 B2 - C3 + E6 C3 A1 B2 - C3 + E6 A5

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:
16.69 ms | 405 KiB | 5 Q