Advance PHP Full Crash Course 2022 | PHP Advanced Concepts

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 14

  • @aarondelgado3421
    @aarondelgado3421 6 місяців тому +2

    Great video so far! You should make a video series on how WordPress was built! :)

  • @mahinkhan9407
    @mahinkhan9407 Рік тому +2

    Thank you. You have became my new mentor.

  • @anshulmady2211
    @anshulmady2211 Рік тому +1

    You will remember me as I will always thankful to you and the one who comments regularly on this beautiful videos... ❤️❤️

  • @slaybryn5504
    @slaybryn5504 6 місяців тому

    God Bless You

  • @dannybolick4783
    @dannybolick4783 11 місяців тому

    Great Job, Thank you.

  • @LifeInMoncton
    @LifeInMoncton Рік тому

    Fibonachi Sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. There are two 1s.

  • @ZackichaneE
    @ZackichaneE Рік тому +1

    thank you 🙏

  • @yasserk2491
    @yasserk2491 Рік тому

    Got a question about interfaces:
    We make an interface and impelement it as a class which have some public functions those return some values. And then we use those functions with calling the class and use the methods we just created. What is the point interface here? we could just create a normal class with two functions and call them and return the values. I mean what exactly does interface here?
    In the other words, we could just code:
    class Table{
    public function save(array $data){
    return "foo";
    }
    public function log($message){
    return $message;
    }
    }
    echo (new Table())->save([]) . "
    ";
    echo (new Table())->log();
    These line do exactly the same!
    ?????

    • @muhtashimwebdev3974
      @muhtashimwebdev3974 Рік тому +2

      The point of interface is that you can implement many interfaces on the same class.
      And you just create function bodies in interface you can't return a value from an interface function you can just defined the return type of data like this :array.

    • @athulak
      @athulak 4 місяці тому +1

      Interface is a way for you to enforce a pattern.
      You can create an interface called AnimalsInterface with 2 methods in them; colour() and sound()
      So every class that implements AnimalsInterface "MUST" have those two methods as well colour() and sound()
      so;
      interface AnimalsInterface {
      public function colour();
      public function sound();
      }
      class Cow implements AnimalsInterface {
      // Must have colour() and sound() methods - otherwise will throw error.
      }
      this is useful in big classes, if some other developer tries to remove or change colour() method in Cow class - it won't work.
      This guarantees every animal classes will have those two methods always.