note 127948 added to function.trim

From: Date: Fri, 18 Nov 2022 13:13:51 +0000
Subject: note 127948 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-219902@lists.php.net to get a copy of this message
Note that triming a null will return an empty string without warning. So the next is true (Note the use of "==="): <?php $a = null; $b = ' '; $thisIsTrue = trim($a) === trim($b); ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.161 (proxied: 90.164.2.93) ---- Manual Page -- https://php.net/manual/en/function.trim.php Edit -- https://main.php.net/note/edit/127948 Del: integrated -- https://main.php.net/note/delete/127948/integrated Del: useless -- https://main.php.net/note/delete/127948/useless Del: bad code -- https://main.php.net/note/delete/127948/bad+code Del: spam -- https://main.php.net/note/delete/127948/spam Del: non-english -- https://main.php.net/note/delete/127948/non-english Del: in docs -- https://main.php.net/note/delete/127948/in+docs Del: other reasons-- https://main.php.net/note/delete/127948 Reject -- https://main.php.net/note/reject/127948 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219902) next »