Inheritance for beginners - OOP in PHP | Part 6

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 12

  • @yuriiyakhnytsia2292
    @yuriiyakhnytsia2292 Год назад

    Really good job, especially if you need to learn PHP in a few days, after the fifth video my mind is blowing, but it's pretty common to Java, just need to get used to the syntax, and some major differences.
    I hope the guy who will work on the project after me will never know me and where I live.

  • @NicoILeone
    @NicoILeone 5 лет назад +4

    Excellent! It is good to refresh language skills! Regards!

  • @GlaucoHass
    @GlaucoHass 4 года назад +3

    lol at the full screen face love declaration 😂

  • @adilrabid6422
    @adilrabid6422 3 года назад +1

    Did'm understood the line - parent::__construct($name, $age, $phone)
    is it for inheriting parent class constructor function?
    thank you!

    • @nazimnizarali4070
      @nazimnizarali4070 3 года назад +2

      Calling parent constructor method is to avoid code duplication. Because 3 properties are already set in parent's constructor method so instead of writing the code again in child class, we can simply call parent constructor in child's constructor method.

  • @rahilarious
    @rahilarious 4 года назад +3

    Sir you type so damn fast. Can make a video on that? xD do typeracer challenge and share tips on improving speed.

  • @habibulislam152
    @habibulislam152 3 года назад +1

    8:15 why it is self:: instead of parent:: ???

  • @SPOKOZE2
    @SPOKOZE2 4 года назад

    Hello! Good job your videos, I saw 5 hour php... few days ago and now watch this course :)
    2:00 to get private property of course I should create method in Parent class but to get protected property can I create this metod in Child class? Do I understand correctly? Is there small inaccuracy in your video...?:)

    • @SPOKOZE2
      @SPOKOZE2 4 года назад

      And next I am going to watch PHP MVC Framework, I always wanted understand how it is work... hehe
      is it good sequence to watch your php wideos?:)

    • @nazimnizarali4070
      @nazimnizarali4070 3 года назад +1

      To get a PRIVATE property of PARENT class you should create method in PARENT class but to get PROTECTED property of PARENT class you can create method in both PARENT and CHILD class.

  • @Kai-xc7qu
    @Kai-xc7qu 6 месяцев назад

    like