3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo preg_replace('#[^A-Za-z0-9\-_]#', '-', "The[quick^brown_fox\ jumps]over`the lazy_dog."); echo "\n\n"; echo preg_replace('#[^A-z0-9\-_]#', '-', "The[quick^brown_fox\ jumps]over the`lazy_dog.");
based on i5v1k
Output for 5.6.38 - 7.3.0rc3
The-quick-brown_fox--jumps-over-the-lazy_dog- The[quick^brown_fox\-jumps]over-the`lazy_dog-