I am including the files 🙂 But I understand the confusion hehe. If you look at my line numbers, you can see that "!DOCTYPE" starts on line 4. I included the file at the top, and I just simply scrolled down so you could see the code further down the page. It's just a bad coincidence that I scrolled JUST FAR ENOUGH for the PHP at the top to not be visible hehe. I'll go ahead and pin this comment in case others need to know this as well. 😉
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 🔥
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 UA-cam 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 :)
Hi, I can't connect to the database. I have seen the first 44 PHP videos. I get a error: Uncaught Error: Call to undefined function mysql_connect() . ($conn, as I called it, like you did). The only thing i did not do, was to make a sign-up form, because I don't want everyone being able to get access to my site. And another problem is, I don't know how to Hash my pwd in the database. Hope you can help. I consider to make a signup-form, just to register one to two users and there after, delete it or hide the signup-button. Will that work? Btw love your videos. Håber virkelig du vil hjælpe mig, ønsker virkelig ikke at give op efter 2 måneders arbejde.
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.
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.
I watched the video while doing something else, 4 years later CHAT GPT is the way! lol its 1000 times better than any video ever recorded for coding! :)
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!
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
Moved to this course from a different PHP course on UA-cam 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
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.
minor point "$this" keyword refers to this instance of the object. For those who do not know yet, an object is an instance of a class. I guess you said what you did to keep things simple at this stage. I know OO from C++ & Java, Im just starting to learn php. Thanks, your course so far is very clear for those who have never touched OO, for me Im seeing php lang & looking at syntax, diff keywords etc in php. Java insists on 1 class per file, c++ it was optional but considered good practise. For those coming from procedural, which I did a long time ago in C we used to use sep files for related groups of functionality. That enabled the whole team to work on the project at the same time and aslo tried to stop the files from becoming so big they were difficult to read. Hope this comment helps. Best wishes. Thank you.
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.
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!
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.
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!
Nice Video Series. It would be great If you can provide a video series from scratch to develop a Live Project like an ERP using OOP's Concept. It would be helpful to clear all small small doubts.
Is accessing a private property by using a public method kinda like the JavaScript's getters & setters? Oh, and thank you for this video! I've been trough a few other materials that teach PHP, but your explanation is the best. Again, thank you.
Thanks for the great videos, they really help me by repeating and adding knowledge to my basic PHP OOP skills in my first job as a programmer. What I always wondered in OOP, is why they call it a function in the code when it's not supposed to be a called a function, but a method. Wouldn't it have been easier to call it public method Blabla()? ^^'' Just to confuse people, I guess. *lol*
Private is only internal CLASS, protected is OK share with family, and public is callable from outside ...so if u call from out side u know u have access only to public at first and then transit lol :) Like a train with customs lol
Jeez, I was so confused. "In the last video" ... I was like, wait, didn't that last video say 2017? Anyway, thanks for these videos, they're super helpful clarifying some things that weren't explained very well in this book I'm reading...
Another way to explain methods vs functions is, a method is exactly just a function but because it is inside of a class now it is called method. function outside a class = function function inside a class = method method outside a class = function method inside a class = method
I was getting Class Pet not found when i tried accessing the the data in the method till i included the Class file in the index.php before i was able to access it. May i know why it worked for you and didnt work for me? or you also included the Class file in the index.php
Thank you very much for the great video! Really enjoying the explanation regarding visibility. Did not see the first 3 lines on the index.php wich probably include the person.inc.php file :)
how do I return multiple values? I've tried using return array($a,$b,$c); However I get an error ": Array to string conversion" The only way I was able to output anything was by doing a print_r($entity->getentity());
If i am given scenarios like this ,how to run it and for exam im not allowed to use a compiler What advice can you give function calculate($arr, &$num){ $result = 0; foreach($arr as $value){ $result += $value; } $num = $result / 2; } $arr = array(0,2,4,6,8); $num = 0; calculate($arr,$num); echo $num;
wondering how to include? Here example -> "" or "" just add above the "!DOCTYPE". but guys remember the path depends on what is the file structure of your folder.
you are not including files in the index.php, did you change the hierarchy of files that we don't know about ?
I am including the files 🙂 But I understand the confusion hehe.
If you look at my line numbers, you can see that "!DOCTYPE" starts on line 4. I included the file at the top, and I just simply scrolled down so you could see the code further down the page. It's just a bad coincidence that I scrolled JUST FAR ENOUGH for the PHP at the top to not be visible hehe.
I'll go ahead and pin this comment in case others need to know this as well. 😉
@@Dani_Krossing thanks sir
@@Dani_Krossing that explains my confusion 🤣 thank you sir.
thank you for asking
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 🔥
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 UA-cam 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 :)
I payed 10$ on patron for you.. if you please make video on login form with php oop. It will be very helpful.
Hi, I can't connect to the database. I have seen the first 44 PHP videos. I get a error: Uncaught Error: Call to undefined function mysql_connect() . ($conn, as I called it, like you did).
The only thing i did not do, was to make a sign-up form, because I don't want everyone being able to get access to my site. And another problem is, I don't know how to Hash my pwd in the database. Hope you can help.
I consider to make a signup-form, just to register one to two users and there after, delete it or hide the signup-button. Will that work?
Btw love your videos. Håber virkelig du vil hjælpe mig, ønsker virkelig ikke at give op efter 2 måneders arbejde.
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.
The best explanation of the difference between protected and private methods/properties I have come across online so far. Thanks!
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.
I watched the video while doing something else, 4 years later CHAT GPT is the way! lol its 1000 times better than any video ever recorded for coding! :)
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!
This is really awesome, if you get stack Add this at the top of the page, index.php => "require_once './includes/person.inc.php';"
I noticed that the required file wasn't in his index.php page... so how did it work in the demo?
@@VSLComputers It is in that file, however you're seeing from the 4th line, ergo there's lines above it, including the NAME.inc.php file.
Hi ,can U pls tell me which page I should add that line to get the results and how ?
Thanks again
@@md.immammehadhihossain1644 add "include includes/person.inc.php" at the top of the index.php file.
thank you so much brother...i have been trying if for 6 hours and got the solution...learned to put .. in front of /includes.....
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
Moved to this course from a different PHP course on UA-cam 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
Thank you 😊 I have a much newer “one long video” that teaches OOP PHP 🙂 it’s the most recent upload I believe
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.
minor point
"$this"
keyword refers to this instance of the object.
For those who do not know yet, an object is an instance of a class.
I guess you said what you did to keep things simple at this stage.
I know OO from C++ & Java, Im just starting to learn php.
Thanks, your course so far is very clear for those who have never touched OO, for me Im seeing php lang & looking at syntax, diff keywords etc in php.
Java insists on 1 class per file, c++ it was optional but considered good practise.
For those coming from procedural, which I did a long time ago in C we used to use sep files for related groups of functionality. That enabled the whole team to work on the project at the same time and aslo tried to stop the files from becoming so big they were difficult to read.
Hope this comment helps.
Best wishes.
Thank you.
This keyword "extends" scared me learning java, you made me understand it in such simple explanation
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!
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.
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!
The way you deliver the subject is one of the best ones, really appreciate what you do, thank you!
So many people have watched this video that copilot auto completes Daniel Nielson, Age 28. Very nice work :)
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.
You are one of the best teacher i have seen so far..... Thank you so much..
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!
I always had a vague understanding of protected properties but never has it been clearer than now, after watching your video.
Your videos should get at least 25% like from the views. Your way of teaching is so easy to understand!
Thank you. it's clearly understand. already i watched 4 videos. I'll keep watching all videos. .
You are a great instructor. Very easy to understand.
Thanks for the very useful tip, not to use the $-sign for the properties and to make clear, that the $-sign is a variable symbol :-)
Very nice!
You explanation is just nice. plz making this type of informative videos. thank you. 😊
Nice Video Series. It would be great If you can provide a video series from scratch to develop a Live Project like an ERP using OOP's Concept. It would be helpful to clear all small small doubts.
Thank you! Your tutorials are great!!!
u are the best.
it's so easy to learn with u
Great tutorials I am very lucky to have you as my tutor
you re a big man . thanks from morocco
I love learning PHP with Elon!
Is accessing a private property by using a public method kinda like the JavaScript's getters & setters? Oh, and thank you for this video! I've been trough a few other materials that teach PHP, but your explanation is the best. Again, thank you.
No hate. Just love for the videos. Thanks.
I love your teaching style :-) I notice that you are using the Atom editor in this one. Can you tell me what Syntax theme you are using?
Looks like Dracula. Use vim please, much better!
Thank you very much , you are a great programming teacher
Very good and clear explanation, thanks Sir
Thanks for the tips Mr. Musk.
Best tutorials and playlist
Thanks for the great videos, they really help me by repeating and adding knowledge to my basic PHP OOP skills in my first job as a programmer.
What I always wondered in OOP, is why they call it a function in the code when it's not supposed to be a called a function, but a method.
Wouldn't it have been easier to call it public method Blabla()? ^^'' Just to confuse people, I guess. *lol*
que bien explicado. Muchas gracias!!
This is a very clear explanation. Thank you
Thank you this was great tutorial!
Giving this video a thumbs up because you classified a Pet as a Person :)
Brilliant video! Thank you!
thanks for the update, i hope you can add the "dependency injection" tutorials.
Hey thank you for the great content, I was wondering can you start an android programming course or recommend another course?
He looks like a mix of Elon Musk & Mr.Beast, interesting...
Now I can't unsee it.
ksksks yes, i thought too
If it talks like a musk or gestures like a musk, it's definitely a musk.
#DuckTyping
Thank you Dani.
this great tutorial is very helpful thank you so much
Great tutorials! Thank you
great tutorial, subscribed to not lose the next videos
As always GREAT CONTENT and thank you.
you will have more Subscribers if you make Framework Tutorials.
Wow, Thank you very much ! I've been trying to learn php on my own but got stuck on class. This video really helped me.
Clearly explained, thank you
Thank you.
Bro, you are just awesome
hello from cambodia
Hello 🤩 .. Now What's the best Laraval or .Net Core5 ???
Great explanation!
thank you sir
Thank you
Great stuff!!!!
Well done!
Amazing.. really helpful.. thankssssss
Private is only internal CLASS, protected is OK share with family, and public is callable from outside ...so if u call from out side u know u have access only to public at first and then transit lol :) Like a train with customs lol
I payed 10$ on patron for you.. if you please make video on login form with php oop. It will be very helpful.
Live YT He has a video on creating a login form with PHP.
awesome ,
your a natural born orchestrator
How were you able to access the class from another php file?
include 'filename'
@@penaltypim5605 Was just wondering cause, he doesn't have declare/include in his codes.
Thanks anyway
awesome!
thank you so much
Great
great ... php is again 😍😍
Jeez, I was so confused. "In the last video" ... I was like, wait, didn't that last video say 2017?
Anyway, thanks for these videos, they're super helpful clarifying some things that weren't explained very well in this book I'm reading...
god video tak :)
6:16 The person has an owner!!!! Against this class war we are going to instantiate our objectives .
Planing on continue on JS?
im here 🤓
SUPER !
Waow...
Sar
after
but it's not working for me
@@flophub877
include ("includes/person.inc.php");
If you are in the root folder, you can try
include_once("includes/person.inc.php");
Thank You Brother!
But can anyone tell me how his code works without include?
Just wanted to know..
@@learner4166 Dont think it would work without the includes bro
Lovely!!!
10:00 Caveat: "Person" can not access data from "Pet". So it's not inheriting from one another, per se.
Please, Python complete tut...
Coming from PHP this is really confusing but somehow reminds me of Ruby.
Class = Object enhanced with "functions", managed "visibility" and "scope". So, why do you care about the haters in comment section?
00:02:19 - what is the name the " -> " (arrow sign) which was used to call the "owner" function inside of the pet class?
I read somewhere it's called arrow construct.
Another way to explain methods vs functions is, a method is exactly just a function but because it is inside of a class now it is called method.
function outside a class = function
function inside a class = method
method outside a class = function
method inside a class = method
I feel like all these videos are made for me when you use my name in your videos haha
I was getting Class Pet not found when i tried accessing the the data in the method till i included the Class file in the index.php before i was able to access it. May i know why it worked for you and didnt work for me? or you also included the Class file in the index.php
I'm the 1000th Liker!
Nice Disney princess moves :P
Thanks! I practiced SO long to get the choreography correct, and finally someone noticed!
Thank you very much for the great video! Really enjoying the explanation regarding visibility. Did not see the first 3 lines on the index.php wich probably include the person.inc.php file :)
Thanks Elon Musk for teaching me php
4:39
how do I return multiple values? I've tried using return array($a,$b,$c); However I get an error ": Array to string conversion" The only way I was able to output anything was by doing a print_r($entity->getentity());
If i am given scenarios like this ,how to run it and for exam im not allowed to use a compiler What advice can you give
function calculate($arr, &$num){
$result = 0;
foreach($arr as $value){
$result += $value;
}
$num = $result / 2;
}
$arr = array(0,2,4,6,8);
$num = 0;
calculate($arr,$num);
echo $num;
wondering how to include? Here example -> "" or "" just add above the "!DOCTYPE". but guys remember the path depends on what is the file structure of your folder.