Before any comments! Yes episode 9 is missing! I decided to remove my lesson about the "toString" PHP method, and instead I will upload an episode on "type declaration" soon enough.
Dear fellow students/web developers, Make this channel grow and donate. These videos are better than a lot of the paid ones on Udemy and this guy is making it for free. I would pay for videos this qualitative in a heartbeat. Keep on going man!
This is how you teach. Relax, don't stress you students, don't use complex sentences and acronyms just to show-off how cool your are. I came here from a PHP bootcamp, where they thought they taught entire OOP in 3 hours... complete and utter joke. You a role model teacher!
It is so joyful seeing mmtuts making mistakes. It reminds us that even the best makes mistakes so we should not be frustrated and think little of ourselves when we do so
Love this series so far. At first, on this one you caught me off guard for a second. I thought it sounded like you said Stetic. lol But then realized you said Static. After hearing you say it more it was clear. I love how you explain the reason why you stuff, instead of just telling you to do it. It helps to know why. Thanks
Hi there, love your vids! But could you also include real life practical examples in your tuts? Like creating user objects on register forms and saving them into a db or something like that? Often simplified tutorials just explain the concepts but never show real life examples of using OOP. It makes it a lot harder to apply, there need to be more practical examples. Thank you and great work!
Dani, you are very simplifying it, and that's awesome, Do not worry most of the senior developers misspelling things and that normal in process. Keep it up it's worth the time you are spending.
I'm wondering, If it is good usage to have non-static method checkDrinkingLegality() which compares private property age and static property drinkingAge, so after object initialisation with age 18, method returns false (18 >= 21), but then you can use that static method setDrinkingAge(18) and then, calling checkDrinkingLegality on that object returns true, because meanwhile value of static property of Class changed to 18.
Wow you've done amazing work in this playlist. For a long time I've been trying to understand object-oriented programming and you're making it easy to understand for me. thank you dear!!!
Hey man, new subscriber here. Great course, Great way of teaching and setup. Am really gonna show these videos to my friends too as it's so good and clears up most of the problems we face. Also you look very much like Luka Jović :P
I wonder what your technical setting is for such brilliant presentations. Clear voice, big HD screen, you standing in front of the screen i. e. one can hear and see everything easily. I'd appreciate it if you told us how you do this?!
@Dani_krossing can I summarize by saying static methods and properties are those that do not vary from object to object at instantiation from the class? As in it's said to be static because it's same for any object instantiated from that class
Hy Is It Possible in Php when internet is not available then it will save as local system data and when ever internet is access then it will sync data to database phone admin?
Two thumbs up on the video. In the static example being used the property is public. I am curious to know if it is possible to do this using a private static property and if so, in what type of situation would it best be suited for?
hi, have been subbed a while now and i can say you are the best teacher and you talk so clear and understandable,thanks!I am having some problems with my website (php, js) and i want a little help from you,could you help me?
I don't feel so bad about creating static classes any more. I used to only create helper methods as static because I had this notion that static methods were some kind of bad thing.
I don't get it. I mean, i can call non static method with (new Class)->method(); , but when I don't need the rest of the context, it is cleaner to just use Class::method() ? For example if I have just some support functions that are used across the project?, and the inheritance structure isn't suited to have it just once on the highest level?
Question: What about Static Classes? What do I do when I have several classes which all need access to the same Static Class that holds all the information?
I don't think there is anything like Static Class. The concept of Static is to access properties and methods without creating an object, or without inheriting an entire class just to access one property/method. Separately, if you have several classes that need access from one class (that one class is a 'parent' class by the way... you don't have to declare it a parent class though), then you need to inherit. Check mmtuts' 4th video on "visibility and inheritance".
I think the way i remember static is that it affects all objects of that class, so if you change the drinking age then it will be changed for every object.
There is something i miss cause i tested to call static method and actually I can call them from the instance Object build from the Class ( so the static is not static ?) and I can also go with static way as u say calling inside the class I reach both with no problem.. but when it is a proprety it react differently ?
hi dear thank you for your great tutorials! appreciate it ! because i couldn`t find anyone in whole internet and tutorials who can teach like you! will you gonna make videos about : namespace ,abstract, autoloader ..... and other oop functions and concepts that are in php manual ???? thank you!
Thank you! autoloader is already created and scheduled for upload on Monday :) Abstract classes and methods will also soon be a video. I am going to wait a bit with Namespace.
One point of confusion. If you update a static property, will it go back and update the same property for $person1, $person2, etc.. Will it also use the new value for any newly created $person objects after this?
Can u make a tutorial about how to upload files in MVC pattern using ajax on a action controller? Or how can I pass the file I get from ajax for example $model->fileUpload($thjs->getPost['file']) argument to any function in any class? I couldn't find anything help me plss haha
Hey Daniel, you have awesome courses, I got a very good understanding of OOPs from your video. I was trying something locally and not able to crack it, i know its simple but for some reason its not working. I have an index page and a class file. In class, I have defined it something like this Class ABS{ private $var1 private $var2 private $var3 public function function1(){ Some SQL query which return an iD //from the array i get the below ID, and when i do an echo here it shows the id as well echo $ID = $this->var3 = ID['SrID']; } public function function2(){ echo $ID; //doesnt work //basically trying another SQL here with the ID I get in function1// } ) so how can I get this variable from function1 to function2, I tried a lot but did not work, so for now what I did is, in the index file I got a return from function one and then I have passed that ID to function2 in index, something like below $classvalue = new ABS(); $ID=$classvalue-> function1(); echo $classvalue-> function2($ID); wondering if there is an easy way to it.
On my channel page there is a link to all my courses. But you might be right about that there should be links under the video as well, so I will do that :)
@@Dani_Krossing yes please :) for us to bookmark it, cause currently what is indexed or displayed on your YT page is the older version of the tutorials. TIA!
When i run these code it shows me error: Notice: Undefined variable: setDrinkingAge in C:\xampp\htdocs\oop\index.php on line 20 Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\oop\index.php:20 Stack trace: #0 {main} thrown in C:\xampp\htdocs\oop\index.php on line 20 public static $drinkingAge = 23; public static function setDrinkingAge($newda){ self::$drinkingAge = $newda; } echo Student::$drinkingAge; echo Student::$setDrinkingAge(93); echo Student::$drinkingAge;
You should be aware that public static variables ($drinkingAge) can be changed from anywhere (during code execution), and this change affects all instances that use this static variable. They are some kind of scope-less.
@@Dani_Krossing So... maybe I'm dense, but question: Why use this instead of a hard coded property? I'm thinking (though it WASN'T explicity said, so I could be wrong), is that if say I had an object of Dog, and it's latin name changed, if I did Static, all my objects (old and new would be updated automagically? Is that correct, or am I misunderstanding this?
Before any comments!
Yes episode 9 is missing!
I decided to remove my lesson about the "toString" PHP method, and instead I will upload an episode on "type declaration" soon enough.
You should pin this :)
can you please post the "PLAYLIST" link on the description as well? :) Thanks!
❤😘👌
Dear fellow students/web developers,
Make this channel grow and donate. These videos are better than a lot of the paid ones on Udemy and this guy is making it for free. I would pay for videos this qualitative in a heartbeat. Keep on going man!
Thanks for being one of the few UA-camrs to explain this properly. 👍
This is how you teach. Relax, don't stress you students, don't use complex sentences and acronyms just to show-off how cool your are. I came here from a PHP bootcamp, where they thought they taught entire OOP in 3 hours... complete and utter joke. You a role model teacher!
It is so joyful seeing mmtuts making mistakes.
It reminds us that even the best makes mistakes so we should not be frustrated and think little of ourselves when we do so
Son impresionantes tus lecciones. Jamás me fue tan claro este tema. Te agradezco infinitamente. Sos excelente educador!
I wish I had a teacher like you back then; it would have saved me a lot of time. Thank you, Daniel, for this amazing course. Keep up the great work!
Love this series so far. At first, on this one you caught me off guard for a second. I thought it sounded like you said Stetic. lol But then realized you said Static. After hearing you say it more it was clear. I love how you explain the reason why you stuff, instead of just telling you to do it. It helps to know why. Thanks
Hi there, love your vids! But could you also include real life practical examples in your tuts? Like creating user objects on register forms and saving them into a db or something like that? Often simplified tutorials just explain the concepts but never show real life examples of using OOP. It makes it a lot harder to apply, there need to be more practical examples. Thank you and great work!
Dude, I'm in love with you, sooo good explanations - that's a talent...
hi daniel. Im really grateful for your lessons. i learned more from you than from my school,
thanks
Dani, you are very simplifying it, and that's awesome, Do not worry most of the senior developers misspelling things and that normal in process. Keep it up it's worth the time you are spending.
the first time after many years i understand the purpose of the STATIC in PHP
I'm wondering, If it is good usage to have non-static method checkDrinkingLegality() which compares private property age and static property drinkingAge, so after object initialisation with age 18, method returns false (18 >= 21), but then you can use that static method setDrinkingAge(18) and then, calling checkDrinkingLegality on that object returns true, because meanwhile value of static property of Class changed to 18.
OOP is so freakin confusing, luckily we have you :)
Your videos and teaching style is perfect for me, thank you!!
Wow you've done amazing work in this playlist.
For a long time I've been trying to understand object-oriented programming
and you're making it easy to understand for me.
thank you dear!!!
You changed my programming life for the better...Big up
This explanation was excellentl. Thanks for helping me understand this topic clearly
wow...thanks very mutch man, exactly what I needed. You don't imagine how mutch it helps.
I just facepalmed because I got this far without having subscribed yet.
Fixed that issue!
like a lot the tutorials, you explain very well Sr. Thanks a lot for making them, finally I am understanding PHP !!
An excellent series on PHP OO Programming.
Very good teacher. Good Tutorial
Thank you for your videos, I have found them very helpful. 👍
you are a legendary teacher
You are awesome man.. God bless you
Thanks a lot I think I understand it now, so like a static is almost kind of like a global variable within a certain class
Good job and explanation! Thanks a lot!
Thank you, i really got it clear now.
Hey man, new subscriber here. Great course, Great way of teaching and setup. Am really gonna show these videos to my friends too as it's so good and clears up most of the problems we face. Also you look very much like Luka Jović :P
Great explanation.
Awesome tutorial as always!!
I wonder what your technical setting is for such brilliant presentations. Clear voice, big HD screen, you standing in front of the screen i. e. one can hear and see everything easily. I'd appreciate it if you told us how you do this?!
Thanks man!
Greetings from Brazil :)
video is really good and the content is also good.
Super gode og lærerige videoer
Oooohh *frontend dev taking notes*
Awesome tutorials Daniel! Keep it up
Really helpful budd, keep it up.
I learned something today!
Thanks for your sharing with us
8:35 Best cut ever :D
thank you so much
@Dani_krossing can I summarize by saying static methods and properties are those that do not vary from object to object at instantiation from the class?
As in it's said to be static because it's same for any object instantiated from that class
Thank you!
Good explanation!
Hy Is It Possible in Php
when internet is not available then it will save as local system data and when ever internet is access then it will sync data to database phone admin?
Keep up the good work!
You tutorial is very well
no drinking age! That sounds awesome! haha!
Thank you so mach.
You are an awesome guy!
Awesome
Thanks a lot
❤❤❤❤❤
if u would make the video series in dependency injection and modular programming in php then that would be super great
Nice ❤🔥
Thank you
Thank you so much things making so easy, learned a lot ❤️❤️❤️
Two thumbs up on the video. In the static example being used the property is public. I am curious to know if it is possible to do this using a private static property and if so, in what type of situation would it best be suited for?
Good Tutorial... But want to inform you about some errors. there are errors where you create function getDA, also when you are accessing it!
hi, have been subbed a while now and i can say you are the best teacher and you talk so clear and understandable,thanks!I am having some problems with my website (php, js) and i want a little help from you,could you help me?
I don't feel so bad about creating static classes any more. I used to only create helper methods as static because I had this notion that static methods were some kind of bad thing.
nice work brother keep up the good work love from nepal
Good day may you please explain to me when do you use public, private and protected in php
I don't get it.
I mean, i can call non static method with (new Class)->method(); , but when I don't need the rest of the context, it is cleaner to just use Class::method() ?
For example if I have just some support functions that are used across the project?, and the inheritance structure isn't suited to have it just once on the highest level?
you look like elon musk, great tuto btw
Nice video
Question:
What about Static Classes?
What do I do when I have several classes which all need access to the same Static Class that holds all the information?
I don't think there is anything like Static Class. The concept of Static is to access properties and methods without creating an object, or without inheriting an entire class just to access one property/method.
Separately, if you have several classes that need access from one class (that one class is a 'parent' class by the way... you don't have to declare it a parent class though), then you need to inherit.
Check mmtuts' 4th video on "visibility and inheritance".
I think the way i remember static is that it affects all objects of that class, so if you change the drinking age then it will be changed for every object.
There is something i miss cause i tested to call static method and actually I can call them from the instance Object build from the Class ( so the static is not static ?) and I can also go with static way as u say calling inside the class I reach both with no problem.. but when it is a proprety it react differently ?
If you change a static property to a regular class variable then each derived object could have a different value....
hi dear thank you for your great tutorials! appreciate it !
because i couldn`t find anyone in whole internet and tutorials who can teach like you!
will you gonna make videos about : namespace ,abstract, autoloader ..... and other oop functions and concepts that are in php manual ????
thank you!
Thank you! autoloader is already created and scheduled for upload on Monday :) Abstract classes and methods will also soon be a video. I am going to wait a bit with Namespace.
@@Dani_Krossing thank you very much .i will wait !
what a nice guy :)
thanks sir
One point of confusion. If you update a static property, will it go back and update the same property for $person1, $person2, etc.. Will it also use the new value for any newly created $person objects after this?
A static property isn't object specific, and will change all existing or future objects, since they reference to the same data. 🙂
What if i want to know how many objects were created for the class without using "__construct" maybe with get_called_class???
good job
"we cannot use the static property inside nonstatic method" right??
Sir kindly make a vedio on CRUD system in oop php
is public static similar to const in js?
Can I ask you to film a series of php oop register form programming? :)
THanks
You moved such a long way
nice, but why you didn't mention (self::) ?
Can u make a tutorial about how to upload files in MVC pattern using ajax on a action controller? Or how can I pass the file I get from ajax for example $model->fileUpload($thjs->getPost['file']) argument to any function in any class? I couldn't find anything help me plss haha
Hey Daniel, you have awesome courses, I got a very good understanding of OOPs from your video. I was trying something locally and not able to crack it, i know its simple but for some reason its not working.
I have an index page and a class file. In class, I have defined it something like this
Class ABS{
private $var1
private $var2
private $var3
public function function1(){
Some SQL query which return an iD
//from the array i get the below ID, and when i do an echo here it shows the id as well
echo $ID = $this->var3 = ID['SrID'];
}
public function function2(){
echo $ID; //doesnt work
//basically trying another SQL here with the ID I get in function1//
}
)
so how can I get this variable from function1 to function2, I tried a lot but did not work, so for now what I did is, in the index file I got a return from function one and then I have passed that ID to function2 in index, something like below
$classvalue = new ABS();
$ID=$classvalue-> function1();
echo $classvalue-> function2($ID);
wondering if there is an easy way to it.
where's the link of the PLAYLIST of these tutorials? :)
On my channel page there is a link to all my courses. But you might be right about that there should be links under the video as well, so I will do that :)
@@Dani_Krossing yes please :) for us to bookmark it, cause currently what is indexed or displayed on your YT page is the older version of the tutorials.
TIA!
nice
Hi can make some flutter videos
How can I thank you man :( ? You taught me lots of things thanks!!! really
Do you have a tutorial on How to Create A Membership System Using PHP and MySQL Tutorial with email verification ?? Thanks a lot :D
by the way :: in Php is called "Scope resolution operator"
thanks for this video , but i did not understand that when we must use static keyword
hi can you nake a live stream the last one i loved it
Dude I like you're teaching method.. do you have a Twitter account?
I can't find video number 7
When i run these code it shows me error:
Notice: Undefined variable: setDrinkingAge in C:\xampp\htdocs\oop\index.php on line 20
Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\oop\index.php:20 Stack trace: #0 {main} thrown in C:\xampp\htdocs\oop\index.php on line 20
public static $drinkingAge = 23;
public static function setDrinkingAge($newda){
self::$drinkingAge = $newda;
}
echo Student::$drinkingAge;
echo Student::$setDrinkingAge(93);
echo Student::$drinkingAge;
Would you be interested in making a video on Paypal integration? Seems a lot of people are looking for it these days.
You should be aware that public static variables ($drinkingAge) can be changed from anywhere (during code execution), and this change affects all instances that use this static variable. They are some kind of scope-less.
That's right! You tell them Zeh! ;)
@@Dani_Krossing So... maybe I'm dense, but question: Why use this instead of a hard coded property?
I'm thinking (though it WASN'T explicity said, so I could be wrong), is that if say I had an object of Dog, and it's latin name changed, if I did Static, all my objects (old and new would be updated automagically? Is that correct, or am I misunderstanding this?
First comment here :)
that colon colon is actually called a scope resolution operation -_-
❤