Best explanation ever I hope you reach a million subscribers one day because you provide fabulous content
@ProgramWithGio Жыл бұрын
Thank you so much 💙
@rqqg3 жыл бұрын
Man, I'm used to read the documentation but you make it so much easier and faster to pick up on everything, I'd triple like every vid if I could, alas ony have 2 accounts lol
@ProgramWithGio3 жыл бұрын
I'm super happy to hear that, thank you 🙏
@donmikele072 жыл бұрын
I watched so many tutorials about different technologies but this sounds as the highest level of knowledge, skill set and the way of explanation and expression. Really damn great job!!!!! BTW: I had a discussion with my team leader. He always likes to be right. I claimed and still claim that in late static binding the 'static' keyword is used in the parent class and 'self' in the child class. He claims that 'static' must be present in both classes and that 'self' must not be used in either class. That makes no sense to me. I would like to hear your opinion (although everything can be seen from this video).
@ProgramWithGio2 жыл бұрын
Thank you so much 💙💙. To answer your question, there is no strict rule that "static" has to be used in parent or child. It should be used where late static binding is needed. Same goes for self, it can be used whenever you don't need late static binding, if you don't use inheritance then using self is fine. Your team lead may have a specific reason on why he enforces usage of static, have you asked him?
@donmikele072 жыл бұрын
@@ProgramWithGio thank you so much. I'll check that and let you know.
@ProgramWithGio2 жыл бұрын
@@donmikele07 no problem 👍
@OlgaFB1 Жыл бұрын
I agree
@victorisrael61913 жыл бұрын
Your tutorials are strictly for the elites that will become good php programmers😌..........you teach us what youtubers don't talk about
@ProgramWithGio3 жыл бұрын
It's for all kinds of levels. I try to teach the way I would want to learn. These are the type of stuff you will encounter at work so I want to make sure I cover it with enough detail
@benderbg3 ай бұрын
This lecture was intense but that is how we like it. Thanks Gio!
@ProgramWithGio3 ай бұрын
Yup, moving onto more challenging topics. You got this 💪
@2008rol3 жыл бұрын
Wonderful tutorial.Finally I understand the difference between self and static. Keep going and I really enjoy all of your tutorial
@ProgramWithGio3 жыл бұрын
Glad to hear that, thank you 🙏
@yinonelbaz53092 жыл бұрын
Wow!!! What an amazing explanation!!!
@ProgramWithGio2 жыл бұрын
Thank you 🙏
@Vitalii-m6r Жыл бұрын
This concept is quite hard to grasp but you explained it very well. Thanks!
@ProgramWithGio Жыл бұрын
Happy to hear it was helpful 💙
@mohammadfaisalabdullah1316 Жыл бұрын
Only if I had an instructor like you back in my university days
@ProgramWithGio Жыл бұрын
💙💙
@graceman999 Жыл бұрын
This is perfect! 😃really well explained, thanks
@ProgramWithGio Жыл бұрын
Thank you 🙏
@aleksandrkanygin26723 жыл бұрын
Thank you, that's a very useful course
@ProgramWithGio3 жыл бұрын
You're welcome & thank you 👍
@hakeamgureh24413 жыл бұрын
I still don't understand that thumbs down on this video. Thank you Gio for this great content. Am a big fan of your chanell and share your contents with friends and PHP groups. Continue being awesome as usual and know that you are appreciated. Don't be discouraged and dispirited am 100% sure this channel will be a big hit for PHP ninjas. Do a detailed laravel beginner 101 course like this one, unearthing the basics that other courses skip. Do same on core basics on javascript too and how it works and put it on udemy for full course and snapshots on youtube for marketing. Will buy and definitely anyone on udemy. Definitely deserved. Continue being awesome man.One❤
@ProgramWithGio3 жыл бұрын
Thank you so much Hakeam 🙏. I certainly don't get discouraged cause of few dislikes, don't worry 🙂. I understand that someone may not like or agree with my content and that is perfectly fine. Also there are ton of bots that auto dislike stuff so not a big deal. If someone has an issue I would hope they would post a comment raising concerns and I would be happy to clarify or answer. I'm planning on more Laravel content soon 👍
@TomiBorchert2 жыл бұрын
wow, ppl have different opinions and thoughts, welcome to the real life. Get used to it.
@coder236 Жыл бұрын
incredible tutorial on this, thanks for taking the time to make these videos
@ProgramWithGio Жыл бұрын
Glad you liked it, thank you 🙌
@techatival3 жыл бұрын
Keep going, don't give up!
@ProgramWithGio3 жыл бұрын
That's the plan!
@Zubbee2 жыл бұрын
I understand quite well even though I long to understand in practice too. Let me keep forging ahead. Thanks Gio
@ProgramWithGio2 жыл бұрын
That's awesome, like following your journey
@Zubbee2 жыл бұрын
nice of you to say that Gio. It's tough though...
@TricoliciSerghei3 ай бұрын
Very nice explanation, thank you very much!!
@ProgramWithGio3 ай бұрын
You are welcome!
@karam01012 жыл бұрын
Another great tutorial. Thank you for sharing all these concepts
@ProgramWithGio2 жыл бұрын
Thank you 🙌
@invgreat5608 Жыл бұрын
Goddamn, man. Hard topic, and you've dealt with it perfectly. Thank you!
@ProgramWithGio Жыл бұрын
Thank you, glad you liked it 🙌
@ShortFilmVD3 жыл бұрын
Very well explained 👍
@ProgramWithGio3 жыл бұрын
Thank you
@saugmaddox3493 жыл бұрын
Sir please make a video on php attributes introduced in php 8
@ProgramWithGio3 жыл бұрын
Yup, PHP8 attributes feature will be covered in this course, a bit later though
@giotapetrou2801 Жыл бұрын
thank you so much!! the work you have done is amazing!
@ProgramWithGio Жыл бұрын
You're very welcome 🙌
@adrianez-programuj33133 жыл бұрын
Nice Job!
@ProgramWithGio3 жыл бұрын
Thanks 🙌
@Mahmudulhasan-ts5hm3 жыл бұрын
Thanks
@ProgramWithGio3 жыл бұрын
You're welcome
@johongirrahimov23433 жыл бұрын
***SUMMARY*** So self inside Class always refers to that Class self is used in static inside method refers to Class that called that method static is in
@ProgramWithGio2 жыл бұрын
✅
@saidzihmmou64262 жыл бұрын
well explained!
@alexios43923 жыл бұрын
Nice! It's popular interview question :D
@ProgramWithGio3 жыл бұрын
Yup 🙂
@alexios43923 жыл бұрын
@@ProgramWithGio It would be great if each episode could have gist or repo code to see :)
@ProgramWithGio3 жыл бұрын
@@alexios4392 some later episodes have link to repo
@hiranyasarma88862 жыл бұрын
Nice explanation. :)
@ProgramWithGio2 жыл бұрын
Thank you
@memack1012 жыл бұрын
Thank you.
@ProgramWithGio2 жыл бұрын
You're welcome!
@ilya_123__ Жыл бұрын
thank you!
@ProgramWithGio Жыл бұрын
You're welcome!
@PumpkinSpicePretzels2 жыл бұрын
This was a great explanation. However, I'm in a strange situation where `new static` is used in a class static method that apparently has no child or parent classes 😆 so I don't understand why it's there.
@ProgramWithGio2 жыл бұрын
Not sure what you mean? Class B extends Class A. Maybe you missed it in the video.
@arbonkastrati89672 жыл бұрын
Hey Gio, thanks a lot for your great content, a really appreciate your efforts on providing us this high quality knowledge! One thing that i find a bit hard to understand and that there isn't much of information out there , is the idea of forwarding-call and non-forwarding call, could you please give us some thoughts on this?!
@ProgramWithGio2 жыл бұрын
Hello, thank you 🙏. I talked about it a little bit at around 6:12. Also the 2d paragraph in PHP docs explains it as well: www.php.net/manual/en/language.oop5.late-static-bindings.php
@benjaminvenezia19442 жыл бұрын
Hey Gio, thank's for this great content! At 9:39, why are your returning static() and not static (without parentheses), it works the same in my IDE in both cases! Thank's for all you're doing, it's awesome!
@ProgramWithGio2 жыл бұрын
Hello, thank you. No particular reason, just a habit & preference. I do same with regular class instantiations like new Invoice() vs new Invoice when no arguments are needed for the constructor. To me it makes sense to have parenthesis because it invokes a method in this case a constructor which is still a method call and method calls have parenthesis
@benjaminvenezia19442 жыл бұрын
@@ProgramWithGio Thank's!
@rosarioveneruso99283 жыл бұрын
Hi Gio , what do we intend exactly with "resolving a class" or "class resolution"?Also , for non native speaker like me , what is binding in general in php exactly?
@ProgramWithGio3 жыл бұрын
Hello, resolving basically means loading the class & all of its dependencies. Binding can mean different things in different contexts. For example in terms of variable bindings they get associated with some sort of identifier internally that reference the object, you can think of it as scoping as well if that helps.
@ryanford5162 жыл бұрын
@@ProgramWithGio thanks, Gio! But honestly... I still don't understand it at all. I mean, the effects of using the "static" keyword in your video are clear because you illustrate it with multiple examples. However, I still don't get the terms used throughout the video. As pointed out, binding can mean various things in different contexts but what about this particular context? In other words, what gets bound to what in your specific code? If it's a topic too vast to cover in a single comment, could you please recommend some beginner-friendly resource that can clear things up?
@ProgramWithGio2 жыл бұрын
@@ryanford516 no problem. Don't overthink the term "binding", think of it as variable being bound to its value like object. It can happen at different times. Not sure what resource I can suggest about it, you can try googling more about late static binding.
@twentxx Жыл бұрын
Thanks a lot 👏
@ProgramWithGio Жыл бұрын
You're welcome 🙌
@ינוןאלבז-כ1ז2 жыл бұрын
There are many claims that PHP is a dead language, from video to video I see how it has risen to life again!
@ProgramWithGio2 жыл бұрын
Heh, thank you 🙌. PHP isn't going anywhere regardless of what many might believe.
@RafaelCeballo2 жыл бұрын
Hey Gio, I want to thank you for this awesome PHP Tutorial I'm learning alot. I'm going to learn Laravel after using Laracast. Do you think I'll need to watch the whole 110 videos to jump into laracast ? If not, can you tell me the video number where I should be ready ? Thanks again!
@ProgramWithGio2 жыл бұрын
Hey. You're welcome, happy to hear that you are learning alot. It depends on your level and if you feel comfortable starting Laravel. You can start it and if things seem hard or complicated then come back and continue watching the videos here. I personally would at least finish 3rd section because we cover some important topics there. Up to you though 👍
@binhphan6321 Жыл бұрын
Good tutorial. I don't understand some points, could you explain them to me? The difference between static and $this variable in a non-static context is that: if you call the method using the $this variable, it could call a private method from the same scope while using static could result in a different method call.
@ProgramWithGio Жыл бұрын
Thanks. If you had a private method in the same class & you used $this it would call that method from the same class, however with static:: it may call the parent one depending on where its called from
@binhphan6321 Жыл бұрын
Thanks for your explanation@@ProgramWithGiobut it's still unclear to me. Let me give an example: class ClassA1 { public function showClassName() { echo $this->getClassName(); } private function getClassName() { return 'A1'; } } $classA1 = new \App\ClassA1(); $classA1->showClassName(); We have a private method: getClassName, we use $this in the method showClassName to call the private method getClassName. After we run the script we get the result "A1" If I have ClassB1 extends ClassA1 class ClassB1 extends ClassA1 { } How can I implement what you have stated with $this and static::?
@sym2574 Жыл бұрын
👍👍👍👍👍👍👍👍👍
@ProgramWithGio Жыл бұрын
👍👍
@abdulkaeum38633 жыл бұрын
3rd KZbin video on Late Static Binding today. No need to go on to a 4th
@ProgramWithGio3 жыл бұрын
👍
@aleksandrkanygin2672 Жыл бұрын
Can i use self for non static method calls?
@ProgramWithGio Жыл бұрын
You could but I'd suggest to use $this instead
@aleksandrkanygin2672 Жыл бұрын
@@ProgramWithGio but if i want to ensure that method implementation from the current class is used and not from any child class?
@ProgramWithGio Жыл бұрын
@@aleksandrkanygin2672 use this
@dhiaben203 жыл бұрын
7:43 i didn't understand this, is there any example or article that can help understand this
@ProgramWithGio3 жыл бұрын
PHP documentation is a good source: www.php.net/manual/en/language.oop5.late-static-bindings.php
@yizain1891 Жыл бұрын
If none-static name set to private, classB->getName() echos A, but protected works correctly, this is strange