Skip to content

Instantly share code, notes, and snippets.

@shinyzhu
Created August 18, 2010 08:55
Show Gist options
  • Save shinyzhu/534079 to your computer and use it in GitHub Desktop.
Save shinyzhu/534079 to your computer and use it in GitHub Desktop.
<?php
#Does the $str ends with $end?
function str_ends_with($str, $end){
return (substr($str, strlen($str) - strlen($end)) === $end);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment