الأحد، 27 نوفمبر 2011

Overloading in php just like C Sharp

كيف تحصل على التحميل الزائد بشكل أكثر شبها بلغة 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?

الثلاثاء، 22 نوفمبر 2011

ضع خريطة في مدونتك

Google LatLong: Power to the print:


Google Maps can help get you where you want to go, but let's face it, you can't be online all the time. Sometimes you really just need a goo...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates | تعريب وتطوير : قوالب بلوجر معربة