3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Check if a string starts with a substring * * @param string $string * @param string $substr * @return bool */ function str_starts_with(string $string, string $substr): bool { return strpos($string, $substr) === 0; } var_dump( str_starts_with("This is test!", "This"));

This is an error 404

There are `0` results


preferences:
224.79 ms | 946 KiB | 7 Q