4: Visibility And Inheritance In OOP PHP | OOP Scopes | Object Oriented PHP Tutorial | PHP Tutorial

preview_player
Показать описание
In this OOP PHP tutorial I will show you what visibility and inheritance is in OOP PHP. Just know that I will be talking a bit about methods and properties in this episode as well, which we won't fully cover until next episode. It's a long explanation to why, which I will cover in this video :)

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

Рекомендации по теме
Комментарии
Автор

you are not including files in the index.php, did you change the hierarchy of files that we don't know about ?

numaanjaved
Автор

I'm going through an intensive training in coding rn and I have really bad ADHD. I had a tough time following any classes but YOU WERE A LIFE SAVER !! You explained everything so clearly in such a short format too. I don't know how I would've done without you. Wishing you the absolute best and can't wait to learn more from you 🔥

samanthadiep
Автор

Hi everyone! Thank you for your patience. I have quite a lot to share and I will list them one by one bellow here :)
(For anyone who didn't see my message on why I haven't uploaded, it is because my camera has been broken.)

1.
I have managed to borrow a working camera temporarily, so for now it is possible to record videos again. Yay! At some point I will need to get my own though hehe.

2.
This video you are watching right now is a re-upload! Yes I know it isn't very exciting, but it was one I had laying around :)

3.
I have other news I'm excited to share! I have decided to rent an actual office space outside my home, which will be a much better work environment to record videos. Anyone who has experience in working from home can tell you, that "home" isn't always a good work environment because of distractions and limited space. So renting something bigger away from home is a good investment into the future of the channel :) This means (without promising anything) that there could potentially be 1 video a day uploaded to the channel 5 days a week. But not until my office space is ready that is :) The office should be ready around Sept 7th, since I had the opportunity to "customize" the interior of it as it is being renovated for me. I'm excited to see what opportunities this will give me in the future.

4.
A month ago I announced that I was re-doing one of my courses in my spare time, and I asked you all what you thought it might be. Most of you were right when you guessed "PHP" :) Again, because of my camera being broken, I also had to "pause" the recordings of those lessons, but I will get around to it again. And NO! The PHP course will not get uploaded periodically and will not delay other uploads from other courses! Once I'm done making the new PHP course, I will upload ALL EPISODES on the same day at the same time! :) This new PHP course will also allow me to make it a MUCH MORE extensive/detailed course than the one currently on my channel.

5.
During my little "break" from YouTube I have had time to pursue other work, and at the same time teach myself new skills which I can later teach on my channel. I am the type of person who loves learning new things, so I have spend my time educating myself :)

Most of my viewers are still in school according to my analytics, so I hope everyone is having a good vacation! And if you have a job I hope you saved up those juice vacation days to enjoy your summer :)

Dani_Krossing
Автор

I really enjoyed this episode. I've been working with Object Oriented PHP for a long time and never knew that this is what it is. your explanations really gave me more understanding about classes.

eadrentepish
Автор

The best explanation of the difference between protected and private methods/properties I have come across online so far. Thanks!

Nullnummer
Автор

Hey Daniel, I had to stop this video halfway to first make my comment. Before I took a very long break, I watched your entire 65 video series on what you now call ‘Procedural PHP’ and you taught it so well. You teach very well, thank you!

Do not worry about ‘haters’! Some of these similarities you express, are simply metaphors and are very well understood by, I believe, a good number of us. All we need, is to apply deductive reasoning. When you apply a similarity to something, do not worry - you have done your best! There are many other places a brilliant mind can further make reference or research.

Thumbs up for your good tutorials.... and, oh... do not rush to teach a variety, just because you are being pressured to. Teach what you know well, because you, indeed teach it well. All the best.

StarLight-irbz
Автор

Daniel, I just want to express how grateful I am that you offer these videos free of charge. I come from a JS background, and despite having bought a course on PHP, I abandoned it because it was absolutely slipshod in its delivery. I found your courses several months back, and haven't looked back since.


You've helped me develop a solid foundation in the PHP landscape. I'm thankful that you're offering this premium content for free, but I feel I should say I would buy your courses in a heartbeat.


Keep up the great work, and thank you again!

aesthetk_
Автор

you were sent by the PHP God himself. This shit was like an enigma code for three days for me, and here I am 10 minutes, and it's in my system. thanks, dude. you have a talent for teaching man

stanislavidalgo
Автор

This is really awesome, if you get stack Add this at the top of the page, index.php => "require_once './includes/person.inc.php';"

wellingtonchanda
Автор

I know a lot of other people have already commented the same thing but I have to as well. Thank you for these videos. You do a great job of breaking everything down and explaining each concept and how it implement them. And free access. Thank you sir. Well done.

cherryyumdiddly
Автор

So many people have watched this video that copilot auto completes Daniel Nielson, Age 28. Very nice work :)

AnotherMaker
Автор

The way you deliver the subject is one of the best ones, really appreciate what you do, thank you!

savilboy
Автор

Thank's Dani so much for this PHP OOP course. It is actually the first time I begin to understand how OOP is working. a Compliment to you!

williepietersen
Автор

Amazing explanation, nothing too redundant and too tough. Truly a course for the intermediate level programmers and for people who already know a little about OOP but are looking to learn OOP in PHP.

shivamghai
Автор

Moved to this course from a different PHP course on YouTube and already I find it so much easier to follow your teaching style. Thank you so much for you content! Also I spent a while thinking you looked familiar and now I realise you look just like a blonde Elon Musk haha

Parteatime
Автор

You might get hate, but the code says "function." Yes, it's a method, but it's not fair to say it's NOT a function. C++ has issues with this all the time.
The truth is, it's a function but we call it something different to indicate that it is a function OF an object. Usually, it helps to describe or modify the object, but that's not always the case either.

Your simplistic explanation was spot on, and perfect! Don't let the haters get you down!

frulrd
Автор

You are one of the best teacher i have seen so Thank you so much..

monkysonky
Автор

This keyword "extends" scared me learning java, you made me understand it in such simple explanation

odrisystems
Автор

I'm revisiting you videos cause I find them very useful. Please, give us more PHP content (intermediate to advanced) instead of game videos. That's what your audience is here for. Cheers!

simulationtheory
Автор

Hi Dani, thank you for this series. Well thought out and put together.
When it came to visibility, I wondered why one would choose private over public. You hinted at the reason, but did not clarify it. I did a bit of searching because I need to know "why" before I learn "how".
A very good reason to make properties private is that you can put all the data checking into the object to ensure data validity. No other object can intrude on that to insert invalid data into the property. Knowing that, the "why" became more obvious. I am sure there are other reasons, but that did it for me.
I should make all properties private unless I absolutely need to expose them to possible invalid data in order to see the data from outside the object.

fredlegace
join shbcf.ru