Vinze Posted April 25, 2006 Share Posted April 25, 2006 Hey, I got this class (which extends another one, but I don't know if that's relevant), and it has this protected function. That again declares another function which calls $this->somevariable. Now PHP reports the use of $this outside of class scope... How could I fix this? Link to comment https://forums.phpfreaks.com/topic/8352-php-5-function-in-a-function-in-a-class/ Share on other sites More sharing options...
trq Posted April 25, 2006 Share Posted April 25, 2006 Post some code. Link to comment https://forums.phpfreaks.com/topic/8352-php-5-function-in-a-function-in-a-class/#findComment-30627 Share on other sites More sharing options...
Vinze Posted July 31, 2006 Author Share Posted July 31, 2006 I somehow solved this recently (though the question is quite old). I'm not sure what I did, but I think I shouldn't define a funtion in defining a function in defining a class. Link to comment https://forums.phpfreaks.com/topic/8352-php-5-function-in-a-function-in-a-class/#findComment-66457 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.