Doc #64081 [Opn]: Trim can return false
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)