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:
66.15 ms | 402 KiB | 5 Q