frost Posted October 13, 2007 Share Posted October 13, 2007 Can someone tell me what $this-> means? I dont know what to call it so I can't look it up Quote Link to comment https://forums.phpfreaks.com/topic/73043-solved-what-is-this/ Share on other sites More sharing options...
trq Posted October 13, 2007 Share Posted October 13, 2007 The $this keyword is used within a class definition to refer to the instance of (object) that same class (itself). Quote Link to comment https://forums.phpfreaks.com/topic/73043-solved-what-is-this/#findComment-368403 Share on other sites More sharing options...
frost Posted October 13, 2007 Author Share Posted October 13, 2007 So $this->ExpiryDate would be the value for ExpiryDate set by the class? Quote Link to comment https://forums.phpfreaks.com/topic/73043-solved-what-is-this/#findComment-368404 Share on other sites More sharing options...
trq Posted October 13, 2007 Share Posted October 13, 2007 Sort of. $this->ExpiryDate Refers to the property ExpiryDate within that same class. The $this keyword is only relative when used within a class. Quote Link to comment https://forums.phpfreaks.com/topic/73043-solved-what-is-this/#findComment-368405 Share on other sites More sharing options...
frost Posted October 13, 2007 Author Share Posted October 13, 2007 thanks much. Quote Link to comment https://forums.phpfreaks.com/topic/73043-solved-what-is-this/#findComment-368406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.