ID: 39708 User updated by: zizka at seznam dot cz Reported By: zizka at seznam dot cz Status: Wont fix Bug Type: Unknown/Other Function Operating System: All PHP Version: 6.0.0 New Comment:
But this is not the case: I am not trying to change function's return value; empty() is not supposed to write anything, it just examines the variables. So here is the confusion. Previous Comments: ------------------------------------------------------------------------ [2006-12-01 18:51:33] [EMAIL PROTECTED] 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; ?> ------------------------------------------------------------------------ [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