3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php  $pattern = '/[^\w]fox\s/';  if (preg_match($pattern, 'The quick brown fox jumps over the lazy dog'))    {    echo "'fox' is present...";    }    else    echo "'fox' is not present...";  ?>  - See more at: http://www.w3resource.com/php-exercises/php-regular-expression-exercises.php#sthash.nM2kC95Q.dpuf
Output for 5.3.0 - 5.4.32
<?php  $pattern = '/[^\w]fox\s/';  if (preg_match($pattern, 'The quick brown fox jumps over the lazy dog'))    {    echo "'fox' is present...";    }    else    echo "'fox' is not present...";  ?>  - See more at: http://www.w3resource.com/php-exercises/php-regular-expression-exercises.php#sthash.nM2kC95Q.dpuf