-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Version 2.3.2 added a use of str_starts_with via PR #113.
ringcentral-php/src/Platform/Platform.php
Line 117 in 3135589
| return str_starts_with($path, $key); |
str_starts_with requires PHP 8, so the designation of this library as PHP 7.2 compatible is incorrect.
Line 16 in 3135589
| "php": ">=7.2", |
Here is a polyfill:
function str_starts_with(string $haystack, string $needle): bool {
return \strncmp($haystack, $needle, \strlen($needle)) === 0;
}Metadata
Metadata
Assignees
Labels
No labels