3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expr = <<<REGEX / \b # word boundary [a-z]{2,3} # 2 or 3 letters \s* # optional spaces [0-9]{2,3} # 2 or 3 digits \s* # optional spaces [a-z]? # optional single letter \b # word boundary /ix REGEX; $strs = array( 'Honda : CRF 2005 honda crf 50 dirt bike pit bike', 'Honda : XR 2001 honda xr 400 r', 'Honda : CRF 2005 honda crf50 dirt bike pit bike', 'Honda : XR 2001 honda xr400r', ); foreach ($strs as $str) { if (preg_match($expr, $str, $matches)) { var_dump($match[0]); } }
Output for git.master, git.master_jit
Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on value of type null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on value of type null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on value of type null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on value of type null in /in/B3moi on line 24 NULL
Output for rfc.property-hooks
Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on null in /in/B3moi on line 24 NULL Warning: Undefined variable $match in /in/B3moi on line 24 Warning: Trying to access array offset on null in /in/B3moi on line 24 NULL

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:
41.13 ms | 402 KiB | 8 Q