#49165 [Opn->Bgs]: return does not return data
| From: | rasmus@php.net | Date: | Wed, 05 Aug 2009 04:11:55 +0000 |
| Subject: | #49165 [Opn->Bgs]: return does not return data | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140667@lists.php.net to get a copy of this message | ||
ID: 49165
Updated by: rasmus@php.net
Reported By: makapoh at bk dot ru
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: ubuntu linux x64
PHP Version: 5.2.10
New Comment:
Could Not Reproduce - CNR (xkcd status 583)
Previous Comments:
------------------------------------------------------------------------
[2009-08-05 04:06:44] makapoh at bk dot ru
Description:
------------
function not always return data
Reproduce code:
---------------
class a {
function a1() {
$a = 5;
$b = 10;
$c = $a + $b;
echo "$c\n";
return array('a' => $a, 'b' => $b, 'c' => $c);
}
}
class b {
function b1() {
$a = a::a1();
echo $a['c'];
}
}
b::b1();
Expected result:
----------------
15
15
Actual result:
--------------
15
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49165&edit=1