your_twin Posted November 29, 2006 Share Posted November 29, 2006 If i have this line of code:[color=red]$params->def( 'scrolling', 'auto' );[/color]i understand that -[b]$params[/b] is a variable -[b]def()[/b] is a function of some sort -what does the [b]->[/b] operator do or mean? ???i assume its an operator but i cant find it in the php manual @ php.net Link to comment https://forums.phpfreaks.com/topic/28838-what-does-mean/ Share on other sites More sharing options...
JasonLewis Posted November 29, 2006 Share Posted November 29, 2006 i cant give you the best definition but here it goes:$params is a class. and the def() is a function inside of that class. This is called OOP (object orientated programming). To call a function inside of a class you must use the ->I think thats it, just look up OOP somewhere to learn more. Link to comment https://forums.phpfreaks.com/topic/28838-what-does-mean/#findComment-132032 Share on other sites More sharing options...
kiss-o-matic Posted November 29, 2006 Share Posted November 29, 2006 def is a member function of a class. -> is what access that member function. As ProjectFear said, this is what you find in OOP across the board. Just think of it as "calling the def() function on the $param variable". Link to comment https://forums.phpfreaks.com/topic/28838-what-does-mean/#findComment-132246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.