|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-05 01:27 UTC] theteofscuba at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 17:00:01 2025 UTC |
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