ID:               33088
 Updated by:       [EMAIL PROTECTED]
 Reported By:      spam at cimmanon dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: OpenBSD
 PHP Version:      4.3.11
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Please provide a more real-life example with expected and actual
results.


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

[2005-05-21 02:10:51] spam at cimmanon dot org

Description:
------------
For some reason output buffering inside a callback method prevents an
object's properties from being modified outside of the object.  Using
output buffering without a callback works as expected, though.

Reproduce code:
---------------
<?
class foo {
        var $var = '';
        
        function foo() {
                $this->var = 'rar';
                print 'foo started<hr>';
                ob_start(array(&$this, 'bar'));
        }
        
        function bar() {
                print $this->var . "<br>";
                $this->var = 'asdf';
                print $this->var;
        }
}

$foo = new foo;
$foo->var = 'rarar';
?>

Expected result:
----------------
I expected $foo->var to be set to 'rarar' after the initial object
creation via constructor, then 'asdf'.  Instead, it remains set to
'rar', then 'asdf'.



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


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

Reply via email to