|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-13 15:35 UTC] jody_leigh_salt at yahoo dot co dot uk
[2004-12-13 15:47 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ Can't call variable objects. Where as in PHP 4 you can!! Reproduce code: --------------- class bug_test { function bug_test() { //create a test var $this->test_var = 'hello world'; } function echo_test_var() { echo $this->test_var; } function say_hello() { $object = 'this'; $$object->echo_test_var(); } } //let show this bug!! $test = new bug_test(); $test->say_hello(); Expected result: ---------------- Should print "hello world to screen" Actual result: -------------- Notice: Undefined variable: this in c:\www\php_newrust\bug.php on line 20 Fatal error: Call to a member function echo_test_var() on a non-object in c:\www\php_newrust\bug.php on line 20