ID:               35376
 Updated by:       [EMAIL PROTECTED]
 Reported By:      djmaze at cpgnuke dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Win2k
 PHP Version:      5.1.0
 New Comment:

Works fine in PHP 5.1.0


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

[2005-11-25 02:05:46] djmaze at cpgnuke dot com

Description:
------------
I'm building a huge PHP5 script that is using classes.
However somehow by returning function data to a previous call thru
another class the data is not returned but a NULL instead.

The below script has a similar layout as mine but as i said mine is
huge, so if thisone works as expected i will figure out a way to
provide my huge reproducable bug.

Reproduce code:
---------------
<?php

class A
{
    public function foo()
    {
        $foo = 'foo';
        return $foo;
    }
}
class B
{
    public function bar()
    {
        global $A;
        $bar = $A->foo();
        return $bar;
    }
}
class C
{
    public function test()
    {
        global $B;
        $test = $B->bar();
        echo gettype($test);
    }
}

$A = new A();
$B = new B();
C::test();

Expected result:
----------------
string

Actual result:
--------------
NULL


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


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

Reply via email to