3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<< TXT Blah Diddel Foo Bar1 Bar2 One XXY Password%1 = something Password%2 = other Password%3 = nuffing Completely different stuff here RandomS6}=2 User%1 = Henry User%2 = Marcus User%3 = SecretAdmin More stuff Even more stuff Loads of stuff TXT; $matches = []; $string = preg_replace_callback( '~^(?>User.+|Password.+|XXY)$~m', function ($match) use (&$matches) { @$matches[substr($match[0], 0, 4)] .= $match[0].PHP_EOL; return null; }, $input ); print_r(array_merge($matches, preg_split('/^\s+$/m', $string)));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [XXY] => XXY [Pass] => Password%1 = something Password%2 = other Password%3 = nuffing [User] => User%1 = Henry User%2 = Marcus User%3 = SecretAdmin [0] => Blah Diddel Foo Bar1 Bar2 One [1] => Completely different stuff here RandomS6}=2 [2] => More stuff Even more stuff Loads of stuff )

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:
128.2 ms | 406 KiB | 5 Q