ID:               39708
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zizka at seznam dot cz
-Status:           Open
+Status:           Wont fix
-Bug Type:         Documentation problem
+Bug Type:         Unknown/Other Function
 Operating System: All
-PHP Version:      Irrelevant
+PHP Version:      6.0.0
 New Comment:

The error message is clear enough and is used in all cases when you're
trying to change function's return value, like this:
<?php function foo () { return 1; } foo() = 1; ?>


Previous Comments:
------------------------------------------------------------------------

[2006-12-01 18:37:57] zizka at seznam dot cz

Description:
------------
When calling empty() with a return value from function, it says:

Can't use method return value in write context

It would be definitely less confusing if it said something like:

empty() accepts only variables as a parameter.

Reproduce code:
---------------
<?php
empty(trim(""));
?>

Expected result:
----------------
Fatal error: empty() accepts only variables as a parameter in  ... on
line 2

Actual result:
--------------
Fatal error: Can't use method return value in write context in ... on
line 2


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


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

Reply via email to