#32578 [NEW]: inclusion bug unable to access global object methods

From: Date: Mon, 04 Apr 2005 23:25:48 +0000
Subject: #32578 [NEW]: inclusion bug unable to access global object methods
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76776@lists.php.net to get a copy of this message
From: theteofscuba at hotmail dot com Operating system: XP PHP version: 5CVS-2005-04-05 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: inclusion bug unable to access global object methods Description: ------------ see title. i've encountered this problem where the latest snapshot build will not execute methods of global objects. Reproduce code: --------------- file test1.php: <?php global $phpTest; require_once("test2.php"); $phpTest = new PHPTEST(); ?> file test2.php: <?php global $phpTest; class PHPTEST { public $var; function DoSomething() { echo "hi it worked"; } } require_once("test3.php"); ?> file test3.php: <?php global $phpTest; $phpTest->var = "we can set variables just fine"; $phpTest->DoSomething(); // ka-boom ?> Expected result: ---------------- . Actual result: -------------- Fatal error: Call to undefined method stdClass::DoSomething() in C:\php\test3.php on line 4 -- Edit bug report at http://bugs.php.net/?id=32578&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32578&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32578&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32578&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32578&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32578&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32578&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32578&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32578&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32578&r=support Expected behavior: http://bugs.php.net/fix.php?id=32578&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32578&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32578&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32578&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32578&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32578&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32578&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32578&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32578&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32578&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32578&r=mysqlcfg

« previous php.bugs (#76776) next »