Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

what is the difference between function overloading and function over riding?

  1. #1

  2. #2
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,076
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    Hi Friends,
    1.Function Overloading is when multiple function with same name exist in a class. Function Overriding is when function have same prototype in base class as well as derived class. 2.Function Overloading can occur without inheritance. Function Overriding occurs when one class is inherited from another class.
    3.Overloaded functions must differ in either number of parameters or type of parameters should be different. In Overridden function parameters must be same.


    Dynamic Web Design Company Bangalore | Joomla Web Development Company Bangalore | Php Web Development Company Bangalore

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    410
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    1.Function Overloading is the point at which various capacity with same name exist in a class. Capacity Overriding is when capacity have same model in base class just as inferred class.
    2.Function Overloading can happen without legacy. Capacity Overriding happens when one class is acquired from another class.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •