PHP Classes


Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Overloading  
Summary:how to overload a function in php
Author:cemil yilmaz
Date:2009-03-04 23:11:15
Update:2009-03-06 18:31:45

  1. Overloading   Reply   Report abuse  
cemil yilmaz - 2009-03-04 23:51:52
For example
how to write two function with the same name but with different arguments in a class

for example

function xx($a,$b){


function xx($a,$b,$c){


if function gets two parameters it will do something, if it gets three parameters it will do onther thing.


There are 2 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.

Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.