Page 1 of 1

functions vs methods

Posted: Wed Sep 23, 2009 6:09 am
by kickeru
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?

Re: functions vs methods

Posted: Wed Sep 23, 2009 6:30 am
by Mark Baker
A method is a function that is encapsulated within a class