ID: 31302 Updated by: [EMAIL PROTECTED] Reported By: aitrus at tresgeek dot net -Status: Open +Status: Wont fix Bug Type: Feature/Change Request PHP Version: 4.3.10 New Comment:
We can't change this due to BC reasons, also, it doesn't fit a particular language construct (empty is NOT a function!) Previous Comments: ------------------------------------------------------------------------ [2004-12-26 07:43:20] aitrus at tresgeek dot net Description: ------------ I thought that this used to be the behavior of empty()... It would be nice of empty() returned true when passed a string which only had spaces, tabs, or newline characters in it. Reproduce code: --------------- $foo = ' '; if ( empty( $foo ) ) { echo "foo is empty"; } else { echo "foo is NOT empty"; }//if --- output is: 'foo is NOT empty' Expected result: ---------------- expected output: 'foo is empty' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31302&edit=1