3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "12example"; if (preg_match("/^[0-9]{2}/", $string)) { echo "The first two characters are numbers."; } else { echo "The first two characters are not numbers."; }

preferences:
38.43 ms | 404 KiB | 5 Q