note 126275 deleted from function.str-ends-with by cmb

From: Date: Mon, 26 Jul 2021 12:07:08 +0000
Subject: note 126275 deleted from function.str-ends-with by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216663@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_ends_with')) { function str_ends_with (string $haystack, string $needle) { return empty($needle) || substr($haystack, -strlen($needle)) === $needle; } }

« previous php.notes (#216663) next »