note 126806 added to function.str-contains

From: Date: Thu, 27 Jan 2022 03:45:13 +0000
Subject: note 126806 added to function.str-contains
Groups: php.notes 
Request: Send a blank email to php-notes+get-217550@lists.php.net to get a copy of this message
The polyfill that based on original work from the PHP Laravel framework had a different behavior; when the $needle is "" or null: php8's will return true; but, laravel'str_contains will return false; when php8.1, null is deprecated, You can use $needle ?: ""; ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 2407:b9c0:f001:28:5054:ff:fefa:c584) ---- Manual Page -- https://php.net/manual/en/function.str-contains.php Edit -- https://main.php.net/note/edit/126806 Del: integrated -- https://main.php.net/note/delete/126806/integrated Del: useless -- https://main.php.net/note/delete/126806/useless Del: bad code -- https://main.php.net/note/delete/126806/bad+code Del: spam -- https://main.php.net/note/delete/126806/spam Del: non-english -- https://main.php.net/note/delete/126806/non-english Del: in docs -- https://main.php.net/note/delete/126806/in+docs Del: other reasons-- https://main.php.net/note/delete/126806 Reject -- https://main.php.net/note/reject/126806 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217550) next »