APPLY FOR ONLINE Zend Framework Certification

                    
                        1)The main Difference in method and function is method doesnot return a value 
where as function does.

2)The difference between the expressions "method" and "function" is that a "method"
is a member function of a class, whereas a standalone function does not, and a 
standalone function usually exists in global context.

3)Both are used interchangeably, but function is the terminology used in structural 
languages and method is the terminology used in Object Oriented Langauages. 
Also methods exists within objects while functions can exist without objects 
as well.

4)Function is a generic term to be used in procedural programming approach where 
as Method is a term to be used in Object oriented programming approach to 
define a class property.

5)We define method inside class , we define function out side class, function 
is not part of class                    
                


Comment


Back to Top