Regenerate Composer auto-loader
This commit is contained in:
12
vendor/symfony/polyfill-php80/Php80.php
vendored
12
vendor/symfony/polyfill-php80/Php80.php
vendored
@@ -100,6 +100,16 @@ final class Php80
|
||||
|
||||
public static function str_ends_with(string $haystack, string $needle): bool
|
||||
{
|
||||
return '' === $needle || ('' !== $haystack && 0 === substr_compare($haystack, $needle, -\strlen($needle)));
|
||||
if ('' === $needle || $needle === $haystack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('' === $haystack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$needleLength = \strlen($needle);
|
||||
|
||||
return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user