I totally agree, within minute one I understood why I came here. Due to that I stayed for the rest of the content and have started looking through more of the series.
What the hell, no freakin way this tutorial is free. I've been following from the start and it just blew my mind how every topic covered in detail and not create an understanding hole like another tutorial video. DEF gonna check and be your patreon. Thank you sm Gio!
I just LOVE how he explains things. He uses the perfect words to explain each feature and the perfect examples for me to fully get it. When it comes to programming, people's brains work in different ways and the same explanation may not work for everyone. I love how this guys' brain works. It's just what I need ^^
This is tutorial series is indeed a goldmine. Your subscriber count doesn't reflect the quality of this at all. Wish you all the best and thanks a lot!
I do not even know how but I understood every single word you said in this video(my language is not english).Thank you for this explanation,everyone needs your explanation about namespaces.Never knew about aliasing such a good thing.THANK YOU GIO!
I really really really while(true) echo "really!" like your playlist. it is a gold mine! each video is like a piece of art I can safely say I have never thanked a youtuber that much and comment that many times on his videos you are really phenomenal with the insane insane high quality content you provide these are really well put and really well planned videos 🌷✨🌷✨🌷✨🌷 thank you gio I want to go all around telling my dev friends about your videos
WOW. This is almost Linked in quality tutorial. very well explained. thank you. the only difference is the you speak a bit to fast when compared to professionals instructors. Other than that, you are up there with then. Great job.
Great explanation for namespaces! In addition to conflicts with namespaces you also mention the readability part of it. I often think about a general point where people discuss that its a pitty that PHP does not allow to extend a class to more than one class. Where most solutions come to interfaces and traits I usually found the core that it usually you need two separated classes as although you commonly talk about the "same" object you indeed think about two different objects. Let me give you an example of apps for vetenarians: It could make sense to have classes like Animals, Mammals extends to Animals, Dogs extends to Mammals, Labrador extends Dogs.... On the other hand classes like Customers, Patients extend Customers, Selfpayers extends Patients could be needed as well. On the other hand the Dogs are the Patients as well. I often don't go with Interfaces or Traits as the business case is mostly devided if I think about the dog as an animal OR as a patient. In the cases where both worlds might be needed I would instead create extra classes like DogPatients extends to Patients that makes use of public functions of the Dogs class as well and as maybe CatPatients that makes use of another Cats class. If however the primary point of view changes I have again extra classes like PatientDogs extends Dogs that only make use of public functions of Patients class. In these cases I guess using the alias DogPatients for the Patient class and the other way around would result in the usage of PatientDogs and DogPatients which shows that it indeed is the same object related to two classes. Do you agree or do you think that creates more confusion instead?
@@ProgramWithGio I see. Maybe I have to break through a wall in my thinking there. I guess a combination of Traits and Interfaces might be the better standard to use.
You could use simple examples like animals or food in your next tutorials, as I am an Arabic person who does not know anything about paddle and stripe vendors, so I went to google and looked up these terms so I could follow along. Thanks a lot for the best PHP tutorial ever
You really are my hero! Can you explain why I need to require CustomerProfile in index.php? I thought I just had to use the full namespace/CustomerProfile in the Transaction file and that would be enough. Why is it necessary to require it? Is it because even if I specify the full namespace when running a new CustomerProfile, the program may not load the class? Is that why I have to require it? In Laravel, when I use the keyword "use", Laravel will help me autoload, so I don't have to require it again. Is that correct?
13+ years. I learn by reading open source code, diving into the source of framework when I don't understand something & by watching videos/reading articles about specific topics.
Its not stated in the video clearly at 11:30, but to instantiate Email class after prepending it with backslash or importing it we also need to include it in the index.php file with: require_once '../Notification/Email.php';
11:00 regarding the fully qualified namespace, I felt that putting a back slash before the namespace was like telling php to return to the global namespace then look for the notification namespace. Is that what it really means ?? Also another question, after 11:00, what keyboard you are using, if you don't mind saying. 😄
Hey! I know it's a big ask for the course which is completely free with such amazing quality. But it would be great if you made a git repo of the code at the end of every video. Will be more than happy to help you if you want.
There is a repo for lessons where it makes sense. Some lessons are pure theory so not much can be put into repo. You can check descriptions of the videos and you will find the link to the repo
Thank you very much. By the way, I think you don't need to apologize for making coding mistake, every developer makes mistakes. Have you ever worked with a developer who doesn't make mistakes?
I followed the tutorial with the same file structure. Am using PHP 8.2.0 alpha with nginx 1.23.1. requiring the full class path works. But when using the namespace keyword, everything breaks with class not found.
I found out the problem. I forgot to add the require_once at the top of the file. I really need to completely remove my Java cap and put the PHP version. Thanks.
When did we instantiate the explode() function ? I did not see that... We get problems when using autoloader and try to instantiate a class from a different Folder. How to solve this problem?
Not sure what you mean. Explode is not a class so you don't instantiate it. What problems are you seeing, can you post error message? Also without seeing your code it's hard to help you, so if you post your code in GitHub I'll be happy to take a look. You can also DM me on Twitter and send me screenshot of the problem 👍
@@ProgramWithGio That's really great, I was doing simple basic php coding for years form my personal project, and I want to learn what's so-called "Software Engineering" your lessons will help a lot.
@@ProgramWithGio Sorry I was confused, I had to watch the video several times to understand that Namespaces are used to use classes that have the same name
@@ProgramWithGio I think what throws me off is that I don't understand why we can't just use an alias on the require statements and use that alias to refer to the correct class
@@das_evoli keep watching, we get to composer & autoloading that will make it make more sense why namespaces are good & better than include/require because namespaces work really well with autoloading.
Bro, the source codes from 2.2 to 2.3 and this one are all disconnected. What i mean is you are popping up scripts from nowhere.😒 The codes in this video are not available as starter. I do not know how the others are finding it to be good but i totally lost.
Some videos don't have a source like this one because there is not much to include. It's mainly theory, it's not like a project. Some videos where more coding is involved the link to source is in the description. This one just shows examples. If you still need these examples ping me on Twitter and I'll write them and send them to you no problem.
@@ProgramWithGio To follow the code, test and try i would need the code. Since it just a theory that it would have been good if you could stated where to locate the starter code at the beginning of each video. You course is very extensive and good but does is not complimented well and seems too rushing. I had to slow down the speed of the video. Anyway, its ok.
@@truthteachers starter code is any of the previous codes, so if you have source from like 2.1 it's the same, you can code along with that, it's just 3 files with about 10 lines of code on each so I don't really see a problem. If anything it's better to write it on your own following the video with pauses but that's just my opinion. As I mentioned other videos where there is more coding involved there is a link to the repo. I'll see if I can commit these files for this video as well 👍. I do agree about the speed being too fast, I improved on that later on, was doing editing wrong and cutting out too many empty spots which makes it sound that I don't breath, should be better in the third section.
I just talk fast in general but during early on in this course I made editing mistakes where I cut out empty spaces so it make it seem like I don't breathe. Should get better later on. That being said, thankfully RUclips has a feature to let you slow it down to your liking
I improved on that in later videos. I've made a mistake where I cut out almost all empty spaces in videos during editing which make it sound like I don't breathe. You can thankfully slow it down on RUclips, click the ⚙️ icon and set playback speed to 0.5x 👍
Bro, at timestamp 13:29 why does the var_dump explode prints 'foo" without the $this in var_dump(explode(',',"hello,world'))? In my case it is still run the built-in explode function and not the class function. I get the date and time printed instead of 'foo'. I am using PHP 8.1.
Because it is running the explode function that is defined in the same file that contains the class, can't use $this because function is not within the class, if you notice it is outside of the class. Show me your code & I may be able to help further since without seeing the code I can't really know why you are getting different result.
Bro, the DateTime Class still loads even though its not in the same namespace. PHP will look for a class within the namespace and if not found it will look for it the global space. Is this correct?
I think I answered your other question which may help answer this as well. In short, yes, if you define function in the same file then it will use that function, otherwise it will look for the function in global space.
@@ProgramWithGio Hi! I'm using vscode and I think @truthteacher is also using it. Vscode "automagically" writes a line with: use DateTime; I think in this case this IDE is "too smart". I'm talking about 09':25'' but I think is the same problem. Gio you are brilliant and this is the best course I have ever taken ❤
Can be because of how it's setup on your end. Also I saw your reply on other comment in email but don't see it here. Maybe RUclips removed it, sometimes it does that. To address that part, I explained how to instantiate objects in the beginning of the section so I'm not sure what you mean. If you follow the course from start to end you should be fine. If you are just picking & watching random videos then yea u might feel like something was missed. Either way the course may not be for everyone, plenty of other courses & content out there. Best of luck 👍
@@ProgramWithGio you explained how to instantiate objects but you didn't explain that in a class we can define a variable/attribute/field of type object as an instance of another class, an example from previous video : class Transaction { public ?Customer customer = null; } please just take this as feedback and nothing else
@@webdevtutorials6579 but that's just a property, I covered properties and property can have any scalar type or object type. The restriction as far types goes is callable & I mentioned that as well I think. Maybe I should've made it clearer, thanks for the feedback.
This just blew every lesson I've gone through on namespaces out of the water. Thanks for such a clear and thorough explanation.
I totally agree, within minute one I understood why I came here. Due to that I stayed for the rest of the content and have started looking through more of the series.
What the hell, no freakin way this tutorial is free. I've been following from the start and it just blew my mind how every topic covered in detail and not create an understanding hole like another tutorial video. DEF gonna check and be your patreon. Thank you sm Gio!
Heh, thank you 🙌 💙
I wish this course goes viral and gets you millions of views
Thank you 🙏
You have very "smooth" tutorials and definitely deserve much more attention. Cheers.
Glad you like them! Thank you & cheers 🙌
by far the best PHP series
Thank you 🙌
Showing errors/fails is completely valid. That way your viewers see why the error occured and will know how to fix it.
I agree, that's why I show errors when I can. It's part of the learning process.
Best PHP tutorial I have ever seen!!!
Thank you 🙌
I just LOVE how he explains things. He uses the perfect words to explain each feature and the perfect examples for me to fully get it. When it comes to programming, people's brains work in different ways and the same explanation may not work for everyone. I love how this guys' brain works. It's just what I need ^^
This means a lot to me, thank you
This is tutorial series is indeed a goldmine. Your subscriber count doesn't reflect the quality of this at all. Wish you all the best and thanks a lot!
Thank you 💙💙
Wow.... So clear, brief and simply put... THANK YOU!
You're very welcome, thank you 💙
holly molly. crystal clear explanation. Thank you man ! You are a great teacher !!! Love from NEPAL
Thank you, hello to Nepal 👋
I do not even know how but I understood every single word you said in this video(my language is not english).Thank you for this explanation,everyone needs your explanation about namespaces.Never knew about aliasing such a good thing.THANK YOU GIO!
Happy to hear that, thank you 🙌
So awesome content. I'm right now brushing up my skills after working 8 years in the industry and this is so helpful
Great to hear, thank you 💙
By far the best programming course I've seen so far., and i have wacth a lot to learn the best practise, thank you very much!
Thank you 💙
Very detailed and structured info in every lesson, thank you so much for your knowledge sharing!
You're very welcome 🙌
I really really really
while(true) echo "really!"
like your playlist. it is a gold mine! each video is like a piece of art
I can safely say I have never thanked a youtuber that much and comment that many times on his videos
you are really phenomenal with the insane insane high quality content you provide
these are really well put and really well planned videos
🌷✨🌷✨🌷✨🌷
thank you gio
I want to go all around telling my dev friends about your videos
Thank you, this means a lot & makes me super happy 🙏💙
Gio, please promise to make this playlist always free. Thank you so much!🥺
I have no plans on making this playlist private
WOW. This is almost Linked in quality tutorial. very well explained. thank you. the only difference is the you speak a bit to fast when compared to professionals instructors. Other than that, you are up there with then. Great job.
Thank you. I am trying to improve on the speed, recent videos should be better :)
that's gold right there !!! thank you so much for these lessons man, it's huge!
You're welcome, thank you 💙
Wow very easy way to explain those concepts
keep going bro 👍💓
Thank you 🙌
Great explanation for namespaces!
In addition to conflicts with namespaces you also mention the readability part of it. I often think about a general point where people discuss that its a pitty that PHP does not allow to extend a class to more than one class. Where most solutions come to interfaces and traits I usually found the core that it usually you need two separated classes as although you commonly talk about the "same" object you indeed think about two different objects.
Let me give you an example of apps for vetenarians:
It could make sense to have classes like Animals, Mammals extends to Animals, Dogs extends to Mammals, Labrador extends Dogs....
On the other hand classes like Customers, Patients extend Customers, Selfpayers extends Patients could be needed as well.
On the other hand the Dogs are the Patients as well. I often don't go with Interfaces or Traits as the business case is mostly devided if I think about the dog as an animal OR as a patient. In the cases where both worlds might be needed I would instead create extra classes like DogPatients extends to Patients that makes use of public functions of the Dogs class as well and as maybe CatPatients that makes use of another Cats class. If however the primary point of view changes I have again extra classes like PatientDogs extends Dogs that only make use of public functions of Patients class.
In these cases I guess using the alias DogPatients for the Patient class and the other way around would result in the usage of PatientDogs and DogPatients which shows that it indeed is the same object related to two classes. Do you agree or do you think that creates more confusion instead?
Yea that could be a way to solve such issues. I personally would make Patient an interface so that way anyone can be a patient
@@ProgramWithGio I see. Maybe I have to break through a wall in my thinking there. I guess a combination of Traits and Interfaces might be the better standard to use.
Very easy to follow, thank you!
You're welcome 🙌
You are so good 😊 I will became PHP god because of you :D Thank you so much
You can do it! Thank you
The best PHP tuts!
Thank you 🙌
Thank you. Very good explanation !
Thank you 💙
Namespaces are great. Thanks for the video!
You're welcome
You could use simple examples like animals or food in your next tutorials, as I am an Arabic person who does not know anything about paddle and stripe vendors, so I went to google and looked up these terms so I could follow along.
Thanks a lot for the best PHP tutorial ever
Stripe and paddle are like payment gateways, it's real life examples. Using animals or food wouldn't make sense in this context
Phew! 20 minutes took me 100minutes of my times to understand and complete as a PHP beginner
It's ok and totally normal. I sometimes need to watch tutorial videos multiple times to understand things
@@ProgramWithGio Yeah, harder it's better it's :)
Stunning! Stunning! Stunning!
Thanks! Thanks! Thanks!
Many thanks
Thank you very much for this video. This was what i have been searching for.
Happy to hear 🙌
What a wonderful and outstanding lesson... Top notch
Thank you 🙏
best php course
You really are my hero! Can you explain why I need to require CustomerProfile in index.php?
I thought I just had to use the full namespace/CustomerProfile in the Transaction file and that would be enough.
Why is it necessary to require it?
Is it because even if I specify the full namespace when running a new CustomerProfile, the program may not load the class?
Is that why I have to require it?
In Laravel, when I use the keyword "use", Laravel will help me autoload, so I don't have to require it again. Is that correct?
Thank you. We are not using autoloading in this episode, next episode is where we add composer & autoloading so require will no longer be needed.
Very good class, thank you!!!!!!
Thank you 🙌
Thanks for share with us!
💙💙
Hey Gio, thanks for all you do. Please how long have you been writing PHP code and how do you learn
13+ years. I learn by reading open source code, diving into the source of framework when I don't understand something & by watching videos/reading articles about specific topics.
Perfect explanation! Thanks
Thank you 💙
Thanks for explaining this.
You're welcome 👍
Great explanation!!
Thank you
with this course I am starting to understand how Laravel is structured
That's awesome, happy to hear
Thanks a lot Gio. I follow
Thank you
first! amazing as always!
Thank you :)
Its not stated in the video clearly at 11:30, but to instantiate Email class after prepending it with backslash or importing it we also need to include it in the index.php file with:
require_once '../Notification/Email.php';
Thanks for pointing it out. I think I accidentally cut out the audio/video portion during editing
Best of the Best 🥰
Thank you
11:00 regarding the fully qualified namespace, I felt that putting a back slash before the namespace was like telling php to return to the global namespace then look for the notification namespace. Is that what it really means ??
Also another question, after 11:00, what keyboard you are using, if you don't mind saying. 😄
Yea pretty much. Dont remember which keyboard I was using at that time :D
Great
Thanks
Hey! I know it's a big ask for the course which is completely free with such amazing quality. But it would be great if you made a git repo of the code at the end of every video. Will be more than happy to help you if you want.
There is a repo for lessons where it makes sense. Some lessons are pure theory so not much can be put into repo. You can check descriptions of the videos and you will find the link to the repo
@@ProgramWithGio Got you. Just thought it would be easy to code along for a beginner like me.
Thanks a lot for your awesome videos . Can you just create videos for design patterns too ?
You're welcome, thank you for the suggestion
thank you
You're welcome
i could not help but like
Thank you
Super excellent!!
Thank you
Good lesson,
Can you make a cool video like this about microservice architecture?
Maybe in future
@@ProgramWithGio
I'm impatiently waiting and everyone is also waiting for you, thank you for everything you do
Thank you 🙏
You're welcome
Thank you sir
🙌🙌
Thank you very much. By the way, I think you don't need to apologize for making coding mistake, every developer makes mistakes. Have you ever worked with a developer who doesn't make mistakes?
Of course, this was more like a joke. Thank you 🙌
I followed the tutorial with the same file structure. Am using PHP 8.2.0 alpha with nginx 1.23.1. requiring the full class path works. But when using the namespace keyword, everything breaks with class not found.
I found out the problem. I forgot to add the require_once at the top of the file. I really need to completely remove my Java cap and put the PHP version. Thanks.
Awesome, glad you figured it out
Thank you.
You're welcome 💙
JUST GREAT ...
Thank you
Thanks
No problem
Thank you!
You're welcome 👍
When did we instantiate the explode() function ? I did not see that...
We get problems when using autoloader and try to instantiate a class from a different Folder. How to solve this problem?
Not sure what you mean. Explode is not a class so you don't instantiate it. What problems are you seeing, can you post error message? Also without seeing your code it's hard to help you, so if you post your code in GitHub I'll be happy to take a look. You can also DM me on Twitter and send me screenshot of the problem 👍
I see object(...)#2 but it is the first instance, for example in 16:07. So how this number 2 comes
There are 2 objects, 2 different instances
U r a great teacher but one thing is that your speed is too fast those who barely understand will struggle a lot in this course ❤
Yes, you are right. This was a mistake I made in some of these videos. Gets better in third section
When i use the bracket to import multiple classes from the same namespace, i can not use my vscode right click "import class" functionnality anymore
I don't use vscode so I'm not sure what the issue is. You can DM me with a screenshot & I can help troubleshoot it if you still need help
Please make a video on debugging in php there is no video available
There is a video about debugging using xdebug in third section. Keep watching & you'll get there
Can you do ActiveRecord PHP tutorial, I subscribe waiting for the tutorial very few made tutorials like you.
Thank you for subscribing. We will cover active record basics in the third section, we are on Data Mapper now & Doctrine.
@@ProgramWithGio That's really great, I was doing simple basic php coding for years form my personal project, and I want to learn what's so-called "Software Engineering" your lessons will help a lot.
Why do we have to import the file but also use the use {namespace}?
Not sure I understand the question, can you clarify? You need use statement to import the file
@@ProgramWithGio Sorry I was confused, I had to watch the video several times to understand that Namespaces are used to use classes that have the same name
Can you explain php inotify
I have not used inotify. Not sure if I will include that in this series but maybe as a stand alone video, thanks for the suggestion
1:55 didn't actually get error with constants.
Are you sure its the same constant name & both files are included in the same place?
whats your IDE?
Phpstorm
Why is name spacing functions not a common practice but classes are?
What do you mean? Namespaces is very common
@@ProgramWithGio You said at 5:10 that namespacing functions and constants are not common practice.
Ah I misunderstood the question. Its just I dont se namespacing functions being used alot in codebases
Not 100% sure if I like how php handles namespacing. It looks like it can get messy pretty fast
Can you elaborate? I think namespaces are actually done pretty well
@@ProgramWithGio I think what throws me off is that I don't understand why we can't just use an alias on the require statements and use that alias to refer to the correct class
@@das_evoli keep watching, we get to composer & autoloading that will make it make more sense why namespaces are good & better than include/require because namespaces work really well with autoloading.
Bro, the source codes from 2.2 to 2.3 and this one are all disconnected. What i mean is you are popping up scripts from nowhere.😒 The codes in this video are not available as starter. I do not know how the others are finding it to be good but i totally lost.
Some videos don't have a source like this one because there is not much to include. It's mainly theory, it's not like a project. Some videos where more coding is involved the link to source is in the description. This one just shows examples. If you still need these examples ping me on Twitter and I'll write them and send them to you no problem.
@@ProgramWithGio To follow the code, test and try i would need the code. Since it just a theory that it would have been good if you could stated where to locate the starter code at the beginning of each video. You course is very extensive and good but does is not complimented well and seems too rushing. I had to slow down the speed of the video. Anyway, its ok.
@@truthteachers starter code is any of the previous codes, so if you have source from like 2.1 it's the same, you can code along with that, it's just 3 files with about 10 lines of code on each so I don't really see a problem. If anything it's better to write it on your own following the video with pauses but that's just my opinion. As I mentioned other videos where there is more coding involved there is a link to the repo. I'll see if I can commit these files for this video as well 👍. I do agree about the speed being too fast, I improved on that later on, was doing editing wrong and cutting out too many empty spots which makes it sound that I don't breath, should be better in the third section.
@@ProgramWithGio Fantastic. Thank you.❤
18:00 Why do you call them Square brackets, when you are using curly brackets ?
use PaymentGateway\Paddle\{Transaction, CustomerProfile}; // {}
You're right, I misspoke. Sometimes I get carried away 😁
What happened? till this video everything was understandable. Here Everything very fast, codes changing fast, speaking very fast ((
You can slow it down on RUclips by setting the playback speed. Is there anything specific that is confusing?
why are you rushing while teaching keep it simple and slow down your speed
I just talk fast in general but during early on in this course I made editing mistakes where I cut out empty spaces so it make it seem like I don't breathe. Should get better later on. That being said, thankfully RUclips has a feature to let you slow it down to your liking
Why Do You Speak So Fast ? I Hate That
I improved on that in later videos. I've made a mistake where I cut out almost all empty spaces in videos during editing which make it sound like I don't breathe. You can thankfully slow it down on RUclips, click the ⚙️ icon and set playback speed to 0.5x 👍
@@ProgramWithGio ok
Bro, at timestamp 13:29 why does the var_dump explode prints 'foo" without the $this in var_dump(explode(',',"hello,world'))? In my case it is still run the built-in explode function and not the class function. I get the date and time printed instead of 'foo'. I am using PHP 8.1.
Because it is running the explode function that is defined in the same file that contains the class, can't use $this because function is not within the class, if you notice it is outside of the class. Show me your code & I may be able to help further since without seeing the code I can't really know why you are getting different result.
Bro, the DateTime Class still loads even though its not in the same namespace. PHP will look for a class within the namespace and if not found it will look for it the global space. Is this correct?
I think I answered your other question which may help answer this as well. In short, yes, if you define function in the same file then it will use that function, otherwise it will look for the function in global space.
@@ProgramWithGio Hi! I'm using vscode and I think @truthteacher is also using it. Vscode "automagically" writes a line with: use DateTime; I think in this case this IDE is "too smart". I'm talking about 09':25'' but I think is the same problem. Gio you are brilliant and this is the best course I have ever taken ❤
use './../..'; didn't work for me
namespace './../..'; worked
Can be because of how it's setup on your end. Also I saw your reply on other comment in email but don't see it here. Maybe RUclips removed it, sometimes it does that. To address that part, I explained how to instantiate objects in the beginning of the section so I'm not sure what you mean. If you follow the course from start to end you should be fine. If you are just picking & watching random videos then yea u might feel like something was missed. Either way the course may not be for everyone, plenty of other courses & content out there. Best of luck 👍
@@ProgramWithGio you explained how to instantiate objects but you didn't explain that in a class we can define a variable/attribute/field of type object as an instance of another class, an example from previous video :
class Transaction {
public ?Customer customer = null;
}
please just take this as feedback and nothing else
@@webdevtutorials6579 but that's just a property, I covered properties and property can have any scalar type or object type. The restriction as far types goes is callable & I mentioned that as well I think. Maybe I should've made it clearer, thanks for the feedback.
thank you
You're welcome