3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "12-blog/", "12-blog/blog2/", "en/12-blog/", "en/12-blog/blog2/" ]; $pattern = '~^(?:en/)?\d{1,3}-[^/]+/$~'; foreach ($strings as $str) { if (preg_match($pattern, $str)) { echo "Match for $str" . PHP_EOL; } else { echo "No match for $str" . PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
Match for 12-blog/ No match for 12-blog/blog2/ Match for en/12-blog/ No match for en/12-blog/blog2/

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