ID:               41312
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vinhar at optusnet dot com dot au
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: windows 5 sp4
 PHP Version:      5CVS-2007-05-07 (CVS)
 New Comment:

[EMAIL PROTECTED] ~]$ php -derror_reporting=8191 -a
Interactive mode enabled

<?php
function &bug()   
{
        return 1 + 1; 
}
$r = bug();
PHP Notice:  Only variable references should be returned by reference
in /usr/home/bjori/- on line 6



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

[2007-05-07 11:42:11] vinhar at optusnet dot com dot au

Description:
------------
A function defined to return by reference returns data when there is no
storage to reference without a warning or notice.
Error reporting is E_ALL.
Version 5.0.33

Reproduce code:
---------------
<?
&bug()
{
    return 1 + 1;
}
$r = bug();
echo $r;
?>


Expected result:
----------------
A warning or notice as follows.

[NOTICE: Only variable references should be returned by reference]



Actual result:
--------------
The above function outputs 2.


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


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

Reply via email to