كيف تحصل على التحميل الزائد بشكل أكثر شبها بلغة c#
ففي لغة C# يمكننا عمل ما يلي:
ففي لغة C# يمكننا عمل ما يلي:
// author: hishamdalal@gmail.com 2011
class person
{
private int ID;
private string Name;
public void Add(string ID, string Name)
{
this.ID = Convert.ToInt32(ID);
this.Name = Name;
}
public person()
{
this.Add("0", "no name!");
}
public person(string ID, string Name)
{
this.Add(ID, Name);
}
}
students s = new students();
s.person(); // method without args
s.person(1, "hisham"); // overload method with args
فكيف يمكننا فعل ذلك بواسطة php?
6:13 ص
Hisham Dalal
