Daniel, WOW. I am currently studying a web developer program and we just started with OOP in PHP. Our teacher - who's really a consultant, is doing quite a "meh" job explaining things, I had such a difficult time understand what $this meant, the differences between private, protected & public, and what i.e $this->name = $name meant. You do such a phenomenal job explaining things, because you actually UNDERSTAND that some of us, as students, DON'T understand some basic things that you know by heart and take for granted. A sincere thank you for all the videos you do, I discovered you recently but I am already a huge fan. Cheers from Sweden!
I noticed this as well, it is difficult (boring?) for people who have worked some time with one technology to explain it on a entry level. If you worked with something for many years, you do not even notice some things that might confuse beginners. I guess that is because consultant is focused on the technology and gets excited when he is using something new, challenging, and teacher is focused on students and gets excited when he see that Aha moment in students
Daniel, I am learning much easier with your explanations and your pace. you are a really good teacher. I am learning Laravel but had to go back to basics. and your course is great. regards from Caracas.
To clear up any confusion at 6:11, I think he meant to say "this specific object" (meaning an instance of the class) when talking about the "this" keyword. Really enjoying this series so far, Dani. Helping me a lot in getting ready for my internship that I have this summer! Edit: I think you explained it better later on in the video. Just wanted to make a comment because I know when I was first learning about classes and object while learning C++, I struggled to understand the correlation and how they worked together.
Same. Many years ago when moving from "C" to "C++" I wrestled for a year or two with Objects vs Classes, not realizing I was not understanding them. Then add "static" to the class properties, and nothing seemed to make sense. One day on a long walk it all became clear. The most confusing was that you didn't even have to instantiate an object to use its static properties and methods.
Hi Dani! this keystroke "-" is often called a dash, though the proper name for it is hyphen. but if you say dash, people will understand that you mean the hyphen.
Orange Code Rough example if(isset($_GET['start_row']) { $start_row = $_GET['start_row']) { } else { $start_row = 0 } mysql = select from table name limit 10 offset $start_row get data and populate Add two buttons, prev & next, querystring start_row=$start_row-10 start_row=$start_row+10
at 7:13 it would be a good idea to check if the $name parameter is of type string OR use type hinting, since any value can be passed in. we would not want the name property to be able to contain integers
You are absolutely right :) type declaration is very useful and should be standard when creating functions/methods in applications. Just to explain why I didn't though... It is for the same reason I leave out talking about things like "namespaces", that I don't talk about type declaration. Because I know that a lot of people who are new to OOP (or PHP in general), are already overwhelmed with me just talking about properties and methods. So while technically correct, I delay some info to make sure that people don't get lost in all the new knowledge. Some might argue that in order to make more complete lessons I shouldn't neglect info like that, and I instead should teach it all comprehensively from start, but I know that there already exist lots of courses on this platform that does that, and those videos are more suited towards people who are faster learners or already have prior knowledge. There does however not exist many tutorials for people (like me) who need to take things one step at a time, which is the type of audience my channel primarily attracts. But you are absolutely right about type declaration :)
Hi Nice to see you again :) I was just wondering why you instantiated the object two times, we could just say: $person = new Person();
$person->setName("Daniel"); echo $person->name; $person->setName("Sam"); echo $person->name; $person->setName("Unknown"); echo $person->name; Anyway, thanks for your great tutorials ! Best regards
In my video I created 2 objects by instantiating the class twice. In your code you created 1 object and kept replacing the value :) that's the difference.
thank you Mr Daniel I really enjoyed your explanation I understand from your lessons you have a good way to explain thanks alot but do you have applications on your channel for php oop??
Hi, it’s Miz here. Nice tutorial. I am wondering which screen recording software are you using. What editing software you use? These info will help me a lot as I do make tuts also.
Hello sir Daniel. I'm new in php and I love to watch your tutorials from the start. I have this confusion that where is the second line of the code was based, which folder?
Thank you very much for these video. I am new to php oop. I see you are instantiating obects into the index.php which I have not seen before. is this another way to do so? I am getting confused!
So I found this with every tutorial teaching properties and methods. Really confusing and even mmtuts does it . So, lets look at this piece of code: public function setName($name){ $this->name = $name; } A beginner will have a rough time understanding the difference between name and $name so my advice is don't even use it as an example it's futhile to do it. I mean you dont even have to use name as a property you can use person, human or any other word. For example : $this->human = $name; will return the same thing as $this->name = $name; So imagine an object as a bubble, inside the bubble you got properties describing the bubble. That being said name is never related to $name, it is only a property that will take different values based on what argument you call the function setName with.
Hi mmtuts, I have watched your nice video more than 10 times above. Tried to learn more and more to understand. It's clear. But your solution doesn't works when am trying to getting access from an another .php page. I mean to say, i have now 3 pages (index.php, master.php & class.inc.php). Ok. Now i have a Class (as per your video) inside the 'class.inc.php'. So, first I have set the Property:Value in-side my index.php. It's good and also echo out. Then after when the index.php redirected to my 'master.php' page by clicked on a Button, i can't able to get the previous set value of the property in the 'master.php'. I have set the property as 'public'. And also done (include_once "./includes/_viewClass.inc.php";) in each of my index & master.php pages. My requirement is to access the Property-value in the master.php, which is already set by in the previous index.php. Can it possible. Any comment and solution is highly appreciated.
You don’t make your websites pages dynamic by creating new pages each time. You instead make a base page, and then change its content dynamically based on who is viewing the page.
I have tried to understand OOP for the last 10 years and it just won't click with me. To me it just looks much more complicated way to do the same thing as procedural.
@@Dani_Krossing Ok thanks. Will be a ride to learn PHP OOP. There was a time when i was a noob at frontend and could write php code but now it is exactly opposite.
I try to make my lessons as "noob" friendly as possible, so I hope you will get something out of these lessons. In my opinion there are no noobs when it comes to learning programming. It just means you have to learn it in a different way than others :)
Daniel, WOW. I am currently studying a web developer program and we just started with OOP in PHP. Our teacher - who's really a consultant, is doing quite a "meh" job explaining things, I had such a difficult time understand what $this meant, the differences between private, protected & public, and what i.e $this->name = $name meant. You do such a phenomenal job explaining things, because you actually UNDERSTAND that some of us, as students, DON'T understand some basic things that you know by heart and take for granted.
A sincere thank you for all the videos you do, I discovered you recently but I am already a huge fan.
Cheers from Sweden!
I noticed this as well, it is difficult (boring?) for people who have worked some time with one technology to explain it on a entry level. If you worked with something for many years, you do not even notice some things that might confuse beginners. I guess that is because consultant is focused on the technology and gets excited when he is using something new, challenging, and teacher is focused on students and gets excited when he see that Aha moment in students
No one explain like this you have perfect teaching skills keep rocking....
This is so underrated. Thanks for making this series.
You have fans from Egypt ❤
Thanks a lot Daniel, your courses are like goldmine
hey thank you for your videos im taking a web dev class in college online and these are a life saver!!
Daniel, I am learning much easier with your explanations and your pace. you are a really good teacher. I am learning Laravel but had to go back to basics. and your course is great. regards from Caracas.
best php oop breakdown on youtube.
Best tutorials and playlist, I'm understanding classes for the first time... and I thought it's so hard, but it's actually easyear than I tought
Congratutlations for being such a great teacher
One of the clearest and simplest explanation I've seen !!
your explanation makes object oriented programming easier to understand. thanks a lot Mr Daniel
the clearest and simplest explanation I've seen !!
I wish I had a professor like u teaching skill 10 on 10 🙏
Probably the best PHP teacher on UA-cam!
Your tutorial makes me get more interested in Php
One of the best explanation that I received about Class in PHP. Thanks !
6:18 The 'dash' on its own is a hyphen!
Funny, I was thinking hyphen but it didn't sound right in my head. I'll remember it for next time :)
binge watching this series like crazy
To clear up any confusion at 6:11, I think he meant to say "this specific object" (meaning an instance of the class) when talking about the "this" keyword. Really enjoying this series so far, Dani. Helping me a lot in getting ready for my internship that I have this summer!
Edit: I think you explained it better later on in the video. Just wanted to make a comment because I know when I was first learning about classes and object while learning C++, I struggled to understand the correlation and how they worked together.
Same. Many years ago when moving from "C" to "C++" I wrestled for a year or two with Objects vs Classes, not realizing I was not understanding them. Then add "static" to the class properties, and nothing seemed to make sense. One day on a long walk it all became clear. The most confusing was that you didn't even have to instantiate an object to use its static properties and methods.
crystal clear about oop. you are the best teacher
Dani, you are the best teacher so far I have been seen ever. Explain everything patiently, thank you so much. :)
You honestly don't get enough credit ! You're the best teacher 💪
Your lessons have helped me immensely!
Hi Dani! this keystroke "-" is often called a dash, though the proper name for it is hyphen. but if you say dash, people will understand that you mean the hyphen.
Great teacher good explain
Thank you. One of the best videos I’ve seen. Never could wrap my head around this.
The "dash" is a hyphen. Great classes, thank you!
Extremely clear tutorials. Many thanks
Please don’t get tired uploading a very useful video tutorial
Wonderful tutorials, easily described and I loved it although I know the subject, wish I have found your tutorials back on the college :)
you are so good a teacher . explain very well . actually u make any person ready to learn learn .
you are a great teacher! Thanks!!!!
For those who missed it, the "include" statement starts at 9:50.
I love it when he does Classes!!! and do a sit up
You remind me of Mr beast for some reason LOL, Great tutorial Mr daniel
sir kindly make a tutorial on pagination in php? thankyou
Orange Code
Rough example
if(isset($_GET['start_row']) {
$start_row = $_GET['start_row']) {
} else {
$start_row = 0
}
mysql = select from table name limit 10 offset $start_row
get data and populate
Add two buttons, prev & next, querystring
start_row=$start_row-10
start_row=$start_row+10
at 7:13 it would be a good idea to check if the $name parameter is of type string OR use type hinting, since any value can be passed in. we would not want the name property to be able to contain integers
You are absolutely right :) type declaration is very useful and should be standard when creating functions/methods in applications.
Just to explain why I didn't though...
It is for the same reason I leave out talking about things like "namespaces", that I don't talk about type declaration. Because I know that a lot of people who are new to OOP (or PHP in general), are already overwhelmed with me just talking about properties and methods. So while technically correct, I delay some info to make sure that people don't get lost in all the new knowledge.
Some might argue that in order to make more complete lessons I shouldn't neglect info like that, and I instead should teach it all comprehensively from start, but I know that there already exist lots of courses on this platform that does that, and those videos are more suited towards people who are faster learners or already have prior knowledge. There does however not exist many tutorials for people (like me) who need to take things one step at a time, which is the type of audience my channel primarily attracts.
But you are absolutely right about type declaration :)
The "Dash and Arrow" operator should be called a Darrow operator. After all, Python programmers refer to the double underscore as dunder.
Cool explanation!
I really like so much this tutorial, thanks Daniel
Hi
Nice to see you again :)
I was just wondering why you instantiated the object two times, we could just say:
$person = new Person();
$person->setName("Daniel");
echo $person->name;
$person->setName("Sam");
echo $person->name;
$person->setName("Unknown");
echo $person->name;
Anyway, thanks for your great tutorials !
Best regards
In my video I created 2 objects by instantiating the class twice. In your code you created 1 object and kept replacing the value :) that's the difference.
Thank you so much, please make a project using PHP oops.
thank you Mr Daniel I really enjoyed your explanation I understand from your lessons you have a good way to explain thanks alot but do you have applications on your channel for php oop??
now I get it clear tnx alot
Hi, it’s Miz here. Nice tutorial. I am wondering which screen recording software are you using. What editing software you use? These info will help me a lot as I do make tuts also.
Hello sir Daniel. I'm new in php and I love to watch your tutorials from the start. I have this confusion that where is the second line of the code was based, which folder?
-> small arrow (or just arrow) , => big arrow 😉
Thank you
always thanks!
thank you! it helps alot in this pandemic, still learning without going to school :)
you deserve more SUBSCRIBERS
Thank you Daniel!
Great tutorial. Nice job sir, its a big help for me
Vey nice Daniel. Such a nice video Thanks a lot mate!
Thank you very much for these video. I am new to php oop. I see you are instantiating obects into the index.php which I have not seen before. is this another way to do so? I am getting confused!
Thanks
6:21 Hey Dani!! I am New to Your Channel! Have Already Subscribed! " - " it is known as dash but it's real name is hyphen!!
Im romanian living in Spain, and for the simplicity we call it "minus" :))
Thanks. Great tutorials bruh!!
great tutorial like always man
Can you please discuss about routing and navigation?
I think I´m stupid, I´m kind of starring at you and not at the class content. :P You look good tho. I think I´m transpassing now. LOL
@mmtuts the proper name of the dash is 'dart'
great teaching but i cant seem to get the method part
Hello Dani can you put this in a playlist, as you did for the other php course
I already have them all in a playlist 😉
6:20 it is called a dash, but the correct word is hyphen haha.
Thank you brother. I was really wishing to find the correct name of that. Thanks again.
This is probably not the best video to start with. I totally new to PHP. But good instructor.
So I found this with every tutorial teaching properties and methods. Really confusing and even mmtuts does it . So, lets look at this piece of code:
public function setName($name){
$this->name = $name;
}
A beginner will have a rough time understanding the difference between name and $name so my advice is don't even use it as an example it's futhile to do it. I mean you dont even have to use name as a property you can use person, human or any other word.
For example : $this->human = $name; will return the same thing as $this->name = $name;
So imagine an object as a bubble, inside the bubble you got properties describing the bubble.
That being said name is never related to $name, it is only a property that will take different values based on what argument you call the function setName with.
New subs
you told us the program you're using but you didn't tell us what kind of computer that was! lol jk, love the videos man thanks a bunch.
Damn you Daniel distracting me with your hip and belly shakes. Can't concentrate on the subject.
Great tutorial as always!
he's a gay...
Daniel I made websites because of you
im here 🤓
Please make a swoole tutorial one day 😊
atom is nice, personnaly i use vscode
I just wonder why did you use include function in this video because previous from previous video I didn't recognize anything going wrong without it
You are epic
You can call "->" an arrow.
Hi mmtuts, I have watched your nice video more than 10 times above. Tried to learn more and more to understand. It's clear. But your solution doesn't works when am trying to getting access from an another .php page. I mean to say, i have now 3 pages (index.php, master.php & class.inc.php). Ok. Now i have a Class (as per your video) inside the 'class.inc.php'. So, first I have set the Property:Value in-side my index.php. It's good and also echo out. Then after when the index.php redirected to my 'master.php' page by clicked on a Button, i can't able to get the previous set value of the property in the 'master.php'. I have set the property as 'public'. And also done (include_once "./includes/_viewClass.inc.php";) in each of my index & master.php pages. My requirement is to access the Property-value in the master.php, which is already set by in the previous index.php. Can it possible. Any comment and solution is highly appreciated.
You can't set variables in one page and call them in another one. You need to use a database with that.
Thanks! Mr. Beast 😂
Bro learning php from Elon is the best that could've happened to me
where is 3 and 4
In this playlist. They are older videos but still valid.
here you go
ua-cam.com/play/PL0eyrZgxdwhypQiZnYXM7z7-OTkcMgGPh.html
It's called a hyphen sir!
Please is there a more efficient way to create a php files (I don't want to create a php file for each page) is there a way to do it dynamically.
You don’t make your websites pages dynamic by creating new pages each time. You instead make a base page, and then change its content dynamically based on who is viewing the page.
I don't think you mentioned classed in episode 4, it was variables and constants
If you don't understand this man it means that yo never understand any one ever!
Agree
nice gaming laptop! may I know the model and specs?
Do you think, it is worth to learn PHP 2019?
Big yes
Dash or Hyphen for '-'. So you're not wrong.
i want source code but i have no e-account to take it from that site
Why he didn't require or include the folder includes/person.inc.php before he used in the index.php
same question here lot in php has changed
Can you make on torrent mobile client use
$this -> name = $name.
Still not making sense to me, I'm begginer. Would you be kind to explain again why you assigned a variable to a variable?
"$this->name" refers to $name variable in the same class. And the "$name" refers to the $name variable in the function(or method).
Maybe you understand, when you change it to:
public function setName ($n) {
$this -> name = $n
}
WHY WHY I COULDNOT OPEN THE LOCALHOST AS THE SAME LIKE YOU WITH DANIAL NAME ???????
I cant find what I have done in the browser..😤😤 ... "This site cant be reached" 🥺🥺🥺
How did you do that? You didn't include the class in index.php... Hoowww???
That's what I was thinking and hope to find out 🤔🤔🤔🤔
I have tried to understand OOP for the last 10 years and it just won't click with me. To me it just looks much more complicated way to do the same thing as procedural.
from www.w3schools.com/php/php_datatypes.asp got here for the obcjects because i didn't understand and now i understand advanced php at first day :p
but note that php isn't my first programming language
Is this tutorial comprehensive?
Why does this look like javascript
Part 3 & 4?
Doesn't need to be updated. So just watch the ones on this playlist.
@@Dani_Krossing Ok thanks. Will be a ride to learn PHP OOP. There was a time when i was a noob at frontend and could write php code but now it is exactly opposite.
I try to make my lessons as "noob" friendly as possible, so I hope you will get something out of these lessons. In my opinion there are no noobs when it comes to learning programming. It just means you have to learn it in a different way than others :)
@@Dani_Krossing Thanks man.