note 125977 added to function.str-contains

From: Date: Fri, 02 Apr 2021 02:11:43 +0000
Subject: note 125977 added to function.str-contains
Groups: php.notes 
Request: Send a blank email to php-notes+get-219322@lists.php.net to get a copy of this message
For earlier versions of PHP, you can polyfill the str_contains function using the following snippet: <?php // based on original work from the PHP Laravel framework if (!function_exists('str_contains')) { function str_contains($haystack, $needle) { return $needle !== '' && mb_strpos($haystack, $needle) !== false; } } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 174.26.128.216) ---- Manual Page -- http://php.net/manual/en/function.str-contains.php Edit -- https://master.php.net/note/edit/125977 Del: integrated -- https://master.php.net/note/delete/125977/integrated Del: useless -- https://master.php.net/note/delete/125977/useless Del: bad code -- https://master.php.net/note/delete/125977/bad+code Del: spam -- https://master.php.net/note/delete/125977/spam Del: non-english -- https://master.php.net/note/delete/125977/non-english Del: in docs -- https://master.php.net/note/delete/125977/in+docs Del: other reasons-- https://master.php.net/note/delete/125977 Reject -- https://master.php.net/note/reject/125977 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#219322) next »