3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = "-val1(sec1)-"; $string2 = "-val2(sec2)-"; $string3 = "-val3(sec3)-"; $big_string = $string1 . $string2 . $string3; if (preg_match_all('/-([^(]+)\(([^)]+)\)-/', $big_string, $matches, PREG_SET_ORDER)) { $result = array_map(static fn($match) => array_slice($match, 1), $matches); print_r($result); }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => val1 [1] => sec1 ) [1] => Array ( [0] => val2 [1] => sec2 ) [2] => Array ( [0] => val3 [1] => sec3 ) )

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