• Call Us: +92-333-7276335
  • - Mail Us: info@shekztech.com

Plot 1177, Sector 31B - Crossing, Karachi, Sindh

Interfaces in PHP | OOP in PHP

Please Login and enroll in this course to view the lesson.

It's time to discuss interfaces in PHP, what are interfaces, and why we interfaces..? these are the basic questions for every student and we gonna find the answer to these questions in this video.

interface Iinterface{
    public function myMethod1();
    public function myMethod2();
    public function myMethod3();
}

class MyClass implements Iinterface{
    public function myMethod1()
    {
        echo 'working..';
    }
    public function myMethod2()
    {
        echo 'working 2.. ';
    }
    public function myMethod3()
    {
        echo 'working 3..';
    }
}

   $obj =  new MyClass();
    $obj->myMethod3();