3v4l.org

run code in 300+ PHP versions simultaneously
<?php $args = [ "(AAA/)(BBB/)(cc)", "(AAA/)xxxx(BBB/)(cc)", "(mystring123/)", "(\\mystring123\\)", ]; foreach ($args as $arg) { if (!preg_match_all("#^(?:\([/a-zA-Z0-9_\\\\-]+\))+$#", $arg, $matches, PREG_OFFSET_CAPTURE)) { var_dump($matches); echo 'The simple pattern "' . $arg . '" is not valid !'; //throw new \Exception('The simple pattern "' . $arg . '" is not valid !'); } }
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> array(0) { } } The simple pattern "(AAA/)xxxx(BBB/)(cc)" is not valid !

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