3v4l.org

run code in 300+ PHP versions simultaneously
<?php $term = "100"; if ($term=="mpv" || $term=="bmw" || $term=="mg") { echo strtoupper($term); } elseif(1 === preg_match('~[0-9]~', $term)){ echo "£$term"; } else { echo ucfirst($term); } ?> <!-- if(1 === preg_match('~[0-9]~', $string)){ echo "£$string"; } ?>

preferences:
60.02 ms | 402 KiB | 5 Q