Doc #65801 [Opn->Wfx]: trim() can return null

From: Date: Tue, 01 Oct 2013 17:41:35 +0000
Subject: Doc #65801 [Opn->Wfx]: trim() can return null
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10347@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65801&edit=1 ID: 65801 Updated by: aharvey@php.net Reported by: mausglov at yandex dot ru Summary: trim() can return null -Status: Open +Status: Wont fix Type: Documentation Problem Package: Documentation problem Operating System: Windows PHP Version: 5.4.20 Block user comment: N Private report: N New Comment: Documented at http://ca2.php.net/functions.internal. Previous Comments: ------------------------------------------------------------------------ [2013-10-01 12:51:29] mausglov at yandex dot ru Description: ------------ Please, add something like: For non-strings trim() can return null ( E.g. http://www.php.net/manual/en/function.parse-url.php has a similar remark ) Test script: --------------- <? $a = new \stdClass(); $b = trim( $a ); var_dump($b); Expected result: ---------------- Warning: trim() expects parameter 1 to be string, object given in ... on line 3 string(0) "" Actual result: -------------- Warning: trim() expects parameter 1 to be string, object given in ... on line 3 NULL ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65801&edit=1

« previous php.doc.bugs (#10347) next »