3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match(^[A-Za-z0-9\-_], "dsgfcdfsg\-sf",$matches); print_r($matches); echo "\n"; preg_match("/(\w*\-)/", "dsgfcdfsg-sf",$matches); print_r($matches);
Output for 5.5.0 - 5.5.6
Parse error: syntax error, unexpected '^' in /in/RQlIe on line 2
Process exited with code 255.
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected '^', expecting ')' in /in/RQlIe on line 2
Process exited with code 255.