Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function str_startswith($str, $needle) {
return 0 === strpos($str, $needle);
}
function str_startswith($str, $needle) {
return $needle === substr($str, 0, strlen($needle));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.