kickeru Posted September 23, 2009 Share Posted September 23, 2009 hi, in php is there a difference between a function and a method? i know in java they are called methods and in c++ called functions. in php i saw both terms used. i was wondering are they just synonyms or does each have a slightly different meaning? Link to comment https://forums.phpfreaks.com/topic/175201-function-vs-method/ Share on other sites More sharing options...
ILMV Posted September 23, 2009 Share Posted September 23, 2009 This is a total punt, but does a function return an value and a method doesn't? Link to comment https://forums.phpfreaks.com/topic/175201-function-vs-method/#findComment-923403 Share on other sites More sharing options...
trq Posted September 23, 2009 Share Posted September 23, 2009 Methods are functions belonging to (and contained within a class). Link to comment https://forums.phpfreaks.com/topic/175201-function-vs-method/#findComment-923405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.