3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '^foo bar$'; if (preg_match("^\^.*\$$", $string)) { print "true"; } else { print "false"; }

preferences:
46.66 ms | 402 KiB | 5 Q