php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49165 return does not return data
Submitted: 2009-08-05 04:06 UTC Modified: 2009-08-05 04:11 UTC
From: makapoh at bk dot ru Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.10 OS: ubuntu linux x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: makapoh at bk dot ru
New email:
PHP Version: OS:

 

 [2009-08-05 04:06 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-05 04:11 UTC] rasmus@php.net
Could Not Reproduce - CNR (xkcd status 583)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 28 05:00:01 2025 UTC