3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$rawGroups = file('/pat/to/.htgroup'); $rawGroups = [ 'admins: amy bill', 'support: charlie david edward', 'guests: fernando ivonne', ]; $usersByGroup = []; foreach ($rawGroups as $rawGroup) { if (!preg_match('/^\s*(?P<group>[\S]+)\s*:\s*(?P<users>.+)\s*$/', $rawGroup, $matches)) { continue; } $usersByGroup[$matches['group']] = preg_split('/\s+/', $matches['users']); } print_r($usersByGroup);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [admins] => Array ( [0] => amy [1] => bill ) [support] => Array ( [0] => charlie [1] => david [2] => edward ) [guests] => Array ( [0] => fernando [1] => ivonne ) )

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