note 129373 added to function.trim
| From: | Anonymous | Date: | Fri, 05 Apr 2024 13:59:15 +0000 |
| Subject: | note 129373 added to function.trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221270@lists.php.net to get a copy of this message | ||
at least on verions 8 there is no need to check for null:
class nada_Test extends PHPUnit\Framework\TestCase
{
function test_trim_null(){
$t = null;
$actual = trim( $t );
$this->assertEquals( "", $actual );
}
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.131 (proxied: 186.0.181.64)
----
Manual Page -- https://php.net/manual/en/function.trim.php
Edit -- https://main.php.net/note/edit/129373
Del: integrated -- https://main.php.net/note/delete/129373/integrated
Del: useless -- https://main.php.net/note/delete/129373/useless
Del: bad code -- https://main.php.net/note/delete/129373/bad+code
Del: spam -- https://main.php.net/note/delete/129373/spam
Del: non-english -- https://main.php.net/note/delete/129373/non-english
Del: in docs -- https://main.php.net/note/delete/129373/in+docs
Del: other reasons-- https://main.php.net/note/delete/129373
Reject -- https://main.php.net/note/reject/129373
Search -- https://main.php.net/manage/user-notes.php