public static function hasSuffix($sNeedle, $sHaystack) { $_iLength = strlen((string) $sNeedle); if (0 === $_iLength) { return true; } return substr($sHaystack, -$_iLength) === $sNeedle; }