3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $query = preg_replace('/[^a-zA-Z0-9.-\s]+/', '_', 'Lorem ipsum - dolor sit - *amet'); var_dump($query);
Output for 5.4.41 - 7.1.0
Warning: preg_replace(): Compilation failed: invalid range in character class at offset 14 in /in/nGsrW on line 2 NULL
Output for 4.3.0 - 5.4.40
string(31) "Lorem ipsum - dolor sit - _amet"