3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ '5,422 Comments, other text here and stuff', '2 Comments, not great!', '4/4/2009 21 Comments', 'This one is a whopper: 1,234,567,890 Comments' ]; foreach ($strings as $string) { echo preg_match('~\d{1,3}(?:,\d{3})*(?= Comments)~', $string, $m) ? $m[0] : 'no match'; echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
5,422 2 21 1,234,567,890

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:
27.22 ms | 403 KiB | 8 Q