I am trying to work on Overloading using magic function
Here is my code:
class file1
    class vLiteUser{
        public function __call($methodname,$arguments)
        {
            if($methodname=='UserLogin'){
                switch(count($arguments)){
                    case 1:
                                $this->UserLogin($arguments[0]);
                        break;
                    case 2:
                                $this->UserLogin($arguments[0],$arguments[1]);
                        break;
                    default:    echo "string";
                                break
                }
            }   
        }    
    public function UserLogin($data0='')
    {
        echo $data0;
    }
    public function UserLogin($data0='',$data2='')
    {   
            echo $pass
    }
} ?>
I have created object in another file
 $userObj = new vLiteUser();
 $userObj->UserLogin(data0,data1);
 $userObj->UserLogin(data0);
My be something I have missing and not able to find what exactly it is
Also I want to ask is private functions also covered in overloading.
 
    