Edit report at http://bugs.php.net/bug.php?id=52235&edit=1
ID: 52235
User updated by: valcool at pisem dot net
Reported by: valcool at pisem dot net
Summary: can't use implode() as inline attribute in empty()
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: windows 7 x64
PHP Version: 5.3.2
New Comment:
documented, my fault
Previous Comments:
------------------------------------------------------------------------
[2010-07-02 14:01:07] valcool at pisem dot net
Description:
------------
using return value of implode() as empty() param causes "Fatal error:
Can't use function return value in write context"
empty(implode($arr))
Test script:
---------------
<?php
$foo = array('b','a','r');
if (empty(implode('', $foo)
{
echo 'ok';
}
else
{
echo 'not ok';
}
?>
Expected result:
----------------
'ok' or 'not ok' string, not fatal error :)
Actual result:
--------------
Fatal error: Can't use function return value in write context
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52235&edit=1