From 7fb5ad8ced4097be4162dd3ac29a208732d27009 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 20 Jul 2021 12:51:46 +0200 Subject: [PATCH] Deprecate MD_STD::startsWith - can be replaced by str_starts_with --- src/MD_STD.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MD_STD.php b/src/MD_STD.php index 262ad61..1f514f2 100644 --- a/src/MD_STD.php +++ b/src/MD_STD.php @@ -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; }