Doc #64081 [Opn]: Trim can return false

From: Date: Sat, 26 Jan 2013 10:27:01 +0000
Subject: Doc #64081 [Opn]: Trim can return false
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9483@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64081&edit=1

 ID:                 64081
 Updated by:         krakjoe@php.net
 Reported by:        blueAlien86 at gmail dot com
 Summary:            Trim can return false
 Status:             Open
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Can you please clarify the bug you are reporting ?


Previous Comments:
------------------------------------------------------------------------
[2013-01-26 09:59:05] blueAlien86 at gmail dot com

Description:
------------
---
From manual page: http://www.php.net/function.trim#refsect1-function.trim-
returnvalues
---

Taken from Empty function documentation:
will not work: empty(trim($name)). Instead, use trim($name) == false.

Test script:
---------------
unset($name);
echo empty(trim($name)); //FAILS
echo trim($name); //FALSE



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64081&edit=1


Thread (4 messages)

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