Edit report at http://bugs.php.net/bug.php?id=52235&edit=1

 ID:               52235
 Updated by:       degeb...@php.net
 Reported by:      valcool at pisem dot net
 Summary:          can't use implode() as inline attribute in empty()
-Status:           Closed
+Status:           Bogus
 Type:             Bug
 Package:          Unknown/Other Function
 Operating System: windows 7 x64
 PHP Version:      5.3.2



Previous Comments:
------------------------------------------------------------------------
[2010-07-02 14:12:31] valcool at pisem dot net

documented, my fault

------------------------------------------------------------------------
[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

Reply via email to