note 126696 added to function.str-ends-with

From: Date: Sun, 19 Dec 2021 19:25:31 +0000
Subject: note 126696 added to function.str-ends-with
Groups: php.notes 
Request: Send a blank email to php-notes+get-217389@lists.php.net to get a copy of this message
In PHP versions lower than 8 you can use this: <?php if (! function_exists('str_ends_with')) { function str_ends_with($haystack, $needle) { return stripos($haystack, $needle) === (strlen($haystack) - strlen($needle)); } } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 94.130.124.123) ---- Manual Page -- https://php.net/manual/en/function.str-ends-with.php Edit -- https://main.php.net/note/edit/126696 Del: integrated -- https://main.php.net/note/delete/126696/integrated Del: useless -- https://main.php.net/note/delete/126696/useless Del: bad code -- https://main.php.net/note/delete/126696/bad+code Del: spam -- https://main.php.net/note/delete/126696/spam Del: non-english -- https://main.php.net/note/delete/126696/non-english Del: in docs -- https://main.php.net/note/delete/126696/in+docs Del: other reasons-- https://main.php.net/note/delete/126696 Reject -- https://main.php.net/note/reject/126696 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217389) next »