📅  最后修改于: 2022-03-11 14:53:44.050000             🧑  作者: Mango
function endsWith( $haystack, $needle ) {
$length = strlen( $needle );
if( !$length ) {
return true;
}
return substr( $haystack, -$length ) === $needle;
}