3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param string $haystack * @param string $needle * * @return bool */ function str_starts_with( $haystack, $needle ) { $length = strlen( $needle ); var_dump(substr( $haystack, 0, $length ), $needle); var_dump(substr( $haystack, 0, $length ) == $needle); var_dump(substr( $haystack, 0, $length ) === $needle); } str_starts_with( '', '' );

This is an error 404

There are `0` results


preferences:
133.18 ms | 1403 KiB | 7 Q