3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $exp = '/^[a-z]{2}|all$/'; $tests = array('fr', 'french', 'FR', 'all', 'ALL'); foreach ($tests as $test) { echo sprintf("%-10s : %s\n", $test, preg_match($exp, $test) ? "OK" : "ERROR"); }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
fr : OK french : OK FR : ERROR all : OK ALL : ERROR