ID:               47348
 Updated by:       [email protected]
 Reported By:      brunner dot adam at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: debian linux
 PHP Version:      5.2CVS-2009-02-09 (snap)
 New Comment:

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.


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

[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

Reply via email to