#04 PHP Object Oriented Programming Basics - OOP | $this keyword | Quick programming tutorial

preview_player
Показать описание
Learn how to code in an object oriented way in PHP. in this series we'll cover the basics of OOP and how to apply it practically in your projects.

link to playlist:

support me on patreon:
Рекомендации по теме
Комментарии
Автор

am your new subscriber, but these comments from others make me rethink twice to continue watching your videos at the same time am asking my self how some one knows that the way you teach is wrong if some one just came here to learn? how does they know because am just following your examples and i feel just cool

healthytips-sv
Автор

13:34 - you call both the calculate_total method $book->calculate_total, and $book->read() which itself inside doin calculation, what`s the point of calling $book->calculate_total() here?

AlishSafarli
Автор

If I try echo Product::generate_id();
I get error message Fatal error: Uncaught Error: Non-static method Product::generate_id() cannot be called statically. Have things changed in PHP. I'm using version 8.

devbites
Автор

I think you have a small issue with properties and fields.
properties should be built as getters, and setters.
while fields were dedicated for strong data.

ab_obada
welcome to shbcf.ru