ID:               24745
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vma1 at abv dot bg
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Slackware Linux 9.0
 PHP Version:      5CVS-2003-07-21 (dev)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Yup, this is expected.


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

[2003-07-21 19:48:06] vma1 at abv dot bg

Description:
------------
"return ($val);" does not work in a function that returns a reference.
"return $val;" is OK.

Reproduce code:
---------------
class lala
{
        var $val;
        
        function lala ()
        {
                $this->val = 0;
        }
        
        function &get_val ()
        {
                $inf = 88;
                $this->val = $inf;
                return ($inf);
        }
}

$obj = new lala;
$vvv = &$obj->get_val ();


Actual result:
--------------
Fatal error: Only variables or references can be returned by reference
in /usr/local/apache/site/htdocs/bug.php on line 15


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


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

Reply via email to