3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'xxxx xxxx xx xxxx xxx foo xxx xxx xxxxx\nxxxx xx foo xxx xxx xxxxx\nxx xxxxx xxxx xx xxx xx bar xx xxxx\nxxxxxx xx xxxxx x xxxx bar\nxxx xxxxx xx xx foo_sub1 xxx xxxx\nxx foo_sub2 xxxxx xxx x xxxx\nxxx xx foo1_sub1 xxx xxxx\nxxxxx foo1_sub2 xxxxx xxx x xxxx'; if (preg_match_all('~\bfoo(?:_\w+)?\b~', $str, $matches)) { print_r($matches[0]); }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => foo [1] => foo [2] => foo_sub1 [3] => foo_sub2 )

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