0

Difference between overloading and overriding ????????

28th Nov 2016, 1:47 AM
P. Sai Sumalatha
P. Sai Sumalatha - avatar
3 odpowiedzi
+ 3
There is a big difference. When you change your mother class methods in your daughter class.  Or in simple technical word method overriding mean changing behavior of the method.It is called overriding. Overloading is a behavior of oop language. When you rewrite a function with same name but with different number of parameters in a class. it is called overloading. Remember PHP is not 100% oop language. if you use oop outside of class it will through an error. Anyway, happy coding.
28th Nov 2016, 2:12 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 3
here is an example that you may want to check to see difference or understand the meanings of overriding and overloading https://code.sololearn.com/c0awDMpDLukF/?ref=app
11th Sep 2017, 3:12 PM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
+ 1
.nothing, it just created to confuse you
28th Nov 2016, 1:48 AM
script