3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pattern = '/a\/(?!(b|c)).*/'; $directories = array( 'a/a', 'a/b', 'a/c', 'a/d' ); foreach ($directories as $d) { if (preg_match($pattern, $d)) { echo "ok:" . $d . "\n"; } else { echo "ng:" . $d . "\n"; } }
based on 4bqa3
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
ok:a/a ng:a/b ng:a/c ok:a/d