From: bbc dot quincy at gmx dot de Operating system: Linux PHP version: 5.2.6 PHP Bug Type: Streams related Bug description: stream_notification_callback inside of object destroys object variables
Description: ------------ The stream_notification_callback is being used inside of a class and tries to modify object variables. Inside of the callback function the varibles are returned in the right way. After leaving the function, changed variables are destroyed. (Example 1) Surprisingly if the variable is modified outside of the switch statement, but still inside of the stream_notification_callback, variable value changes and cannot be overwritten with the following statements. (Example 2) Reproduce code: --------------- Example 1: http://quincy.phoenix.net-build.de/example1.txt Example 2: http://quincy.phoenix.net-build.de/example2.txt Expected result: ---------------- The function should modify the right variables. Actual result: -------------- Example 1 output is: string(7) "unknown" Connected to http://www.php.net MIME-type: text/html;charset=utf-8 NULL Example 2 output is: string(7) "unknown" Connected to http://www.php.net MIME-type: text/html;charset=utf-8 string(12) "also unknown" -- Edit bug report at http://bugs.php.net/?id=46388&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46388&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46388&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46388&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46388&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46388&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46388&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46388&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46388&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46388&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46388&r=support Expected behavior: http://bugs.php.net/fix.php?id=46388&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46388&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46388&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46388&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46388&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46388&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46388&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46388&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46388&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46388&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46388&r=mysqlcfg