ID: 47348 User updated by: brunner dot adam at gmail dot com Reported By: brunner dot adam at gmail dot com Status: Bogus Bug Type: Scripting Engine problem Operating System: debian linux PHP Version: 5.2CVS-2009-02-09 (snap) New Comment:
Thanks, and you're right. This behaviour is described in the manual at include's page. But bit confusing, that -- still if it's optional -- I put the parenthesis, why would not "use" them? Previous Comments: ------------------------------------------------------------------------ [2009-02-09 14:59:46] [email protected] print is a language construct and not a function and since the parenthesis are optional its really: print '' && false Where the second expression is considered part of the first. ------------------------------------------------------------------------ [2009-02-09 13:58:02] brunner dot adam at gmail dot com Description: ------------ "print('') && false" returns integer 1, but "false && print('')" and "(int)1 && false" returns false Reproduce code: --------------- <?php var_dump((print('') && false)); // int(1) ?> Expected result: ---------------- returns bool(false) Actual result: -------------- return int(1) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47348&edit=1
