Jump to content

Archived

This topic is now archived and is closed to further replies.

Vinze

[PHP 5] Function in a function in a class

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.