3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt= ["1 Dead Revels [RNA]", "7 Final Payment [RNA]", "1 Ob Nixilis's Cruelty [WAR]", "1 Aid the Fallen [WAR]", "13 Makeshift Battalion [WAR]", "1 Sunblade Angel [WAR]", "34 Trusted Pegasus [WAR]", "1 Orzhov Racketeers [RNA]", "1 Wanderer's Strike [WAR]", "1 Reya Dawnbringer [UMA]", "4 Expansion // Explosion [GRN]"]; foreach ($txt as $buffer) { if (preg_match('~([0-9]+)\s+(.*?)\s*\[([^][]+)]~', $buffer, $matches)) { print_r(array_slice($matches, 1)); } }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 1 [1] => Dead Revels [2] => RNA ) Array ( [0] => 7 [1] => Final Payment [2] => RNA ) Array ( [0] => 1 [1] => Ob Nixilis's Cruelty [2] => WAR ) Array ( [0] => 1 [1] => Aid the Fallen [2] => WAR ) Array ( [0] => 13 [1] => Makeshift Battalion [2] => WAR ) Array ( [0] => 1 [1] => Sunblade Angel [2] => WAR ) Array ( [0] => 34 [1] => Trusted Pegasus [2] => WAR ) Array ( [0] => 1 [1] => Orzhov Racketeers [2] => RNA ) Array ( [0] => 1 [1] => Wanderer's Strike [2] => WAR ) Array ( [0] => 1 [1] => Reya Dawnbringer [2] => UMA ) Array ( [0] => 4 [1] => Expansion // Explosion [2] => GRN )

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:
118.76 ms | 407 KiB | 5 Q