3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = trim(' {555555 123456 123456} {666666 654321 654321} {777777 123456 123456} '); $items = []; if (preg_match_all('/^{[\d]{1,} ([\d]{1,}) ([\d]{1,})}$/m', $foo, $matches)) { $items = array_reduce( array_slice($matches, 1), fn(array $found, array $match) => array_merge($found, $match), [] ); } var_dump($items);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(6) "123456" [1]=> string(6) "654321" [2]=> string(6) "123456" [3]=> string(6) "123456" [4]=> string(6) "654321" [5]=> string(6) "123456" }

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