valtido Posted September 1, 2008 Share Posted September 1, 2008 Hi i have came across a few variables which seem a little odd to me because i dont know how it works. e.g. $vatriable->whatever(string); $vatriable->whatever(string)->whatever2(string2); im just wondering if anyone knows anything of how the "->" is used? or if there is any documentation about this? Thank you Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/ Share on other sites More sharing options...
burn1337 Posted September 1, 2008 Share Posted September 1, 2008 ok what that is, is object oriented programming the object becomes the variable $Variable to call a function within the object (e.g. SendText()) $Variable = new TextTest; (The Variable becomes the object) $Variable->SendText($Text); now you have called the function from the object Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-630835 Share on other sites More sharing options...
valtido Posted September 1, 2008 Author Share Posted September 1, 2008 thank u burn1337 oh ok it makes sense some what but i will research more into it... by the way is this linked with API ? Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-630840 Share on other sites More sharing options...
burn1337 Posted September 1, 2008 Share Posted September 1, 2008 Your welcome, OOP in my eyes is much easier then flow control, but can also be more complicated as well. and I dont know . Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-630852 Share on other sites More sharing options...
valtido Posted September 1, 2008 Author Share Posted September 1, 2008 http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html who ever needs more info about this lol here it is Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-630883 Share on other sites More sharing options...
JasonLewis Posted September 1, 2008 Share Posted September 1, 2008 What do you mean by "linked with API?" API = Application Programming Interface and it is basically all the functions, etc. Just google PHP5 OOP or even take a look at the tutorial on the PHP Freaks main site (although I think it's for people with basic understanding of PHP4 OOP. Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-630885 Share on other sites More sharing options...
burn1337 Posted September 1, 2008 Share Posted September 1, 2008 Hmm personally I haven't had any experiance with php untill this year, and oop came extremely simplistic for me. Easier to use then typical flow control for me, But also I would suggest php.net, they have an entire web-based manual for php including flow control, oop, as well as help with fronted database functions and objects. Link to comment https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/#findComment-631322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.