Deprecate MD_STD::startsWith - can be replaced by str_starts_with

This commit is contained in:
Joshua Ramon Enslin 2021-07-20 12:51:46 +02:00
parent 01ac23229b
commit 7fb5ad8ced
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -135,6 +135,7 @@ final class MD_STD {
/**
* Function checking if a string starts with another.
* DEPRECATED. Can be replaced by PHP8's str_starts_with.
*
* @param string $haystack String to check.
* @param string $needle Potential start of $haystack.
@ -164,7 +165,7 @@ final class MD_STD {
$output = false;
foreach ($needles as $needle) {
$output = self::startsWith($haystack, $needle);
$output = \str_starts_with($haystack, $needle);
if ($output == true) {
return $output;
}