note 126276 deleted from function.str-starts-with by cmb
| From: | cmb@php.net | Date: | Mon, 26 Jul 2021 12:07:19 +0000 |
| Subject: | note 126276 deleted from function.str-starts-with by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216664@lists.php.net to get a copy of this message | ||
Note Submitter: juliyvchirkov at gmail dot com
----
<?php
// Polyfill for PHP 4 - PHP 7, safe to utilize with PHP 8
if (!function_exists('str_starts_with')) {
function str_starts_with (string $haystack, string $needle)
{
return empty($needle) || strpos($haystack, $needle) === 0;
}
}