3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ '/[$-\w]/', '/[\w-$]/', '/[\w-]/', '/[-\w]/', '/[$-]/', '/[-$]/', ]; foreach($tests as $test) { echo "$test\n"; preg_match($test,''); }

preferences:
26.04 ms | 404 KiB | 5 Q