blackcell Posted December 20, 2007 Share Posted December 20, 2007 Hello all, I have been programming in PHP for a short while. Four months would be an accurate count. I usually mess with it on a daily basis at work and have created multiple programs that depend on pulling, manipulating, and displaying data from a mysql database. I am barely familiar with oop and classes but wish to learn more. This leads me to the ultimate question that has had me wondering all day. What exactly is "->"? I see it in classes and in gnuPHP and I am curious if it has to do with OOP in PHP. I would also like to know more about OOP in php and would like to know if anybody has any good online OOP with PHP reads. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/ Share on other sites More sharing options...
revraz Posted December 20, 2007 Share Posted December 20, 2007 Yes, it's for Objects. You can probably find more info in the OOP forum here. Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/#findComment-419193 Share on other sites More sharing options...
tibberous Posted December 20, 2007 Share Posted December 20, 2007 It's an ascii arrow. In C++, it was use to reference a property of a class you had a pointer to, in PHP, it is just used for objects properties. Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/#findComment-419195 Share on other sites More sharing options...
PHP_PhREEEk Posted December 20, 2007 Share Posted December 20, 2007 More info here: http://www.phpfreaks.com/forums/index.php/topic,95867.0.html PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/#findComment-419198 Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 It's an ascii arrow. In C++, it was use to reference a property of a class you had a pointer to, in PHP, it is just used for objects properties. And methods. Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/#findComment-419202 Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 eg; <?php class simple { public $a = 'foo'; // property public function b() { // method return "Hello!"; } } $obj = new simple(); echo $obj->a; echo $obj->b(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/82448-solved-explain/#findComment-419203 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.