I agree with most of the comments. This course is great, because you go into detail about things and explain very clearly. It's great to have a solid grasp of the language. Thank you for this great contribution that most programmers will surely appreciate a lot!!!
I am new to php but not to programming. No doubt this course is a complex one and so quick but still I love it because you skipped nothing and discussed everything. I still don't believe that how you never skipped any point. You are the real dude of PHP. I envy the juniors who works under you because they are lucky to have such a wonderful mobile chatgpt of PHP like you. I have never seen any language 's tutorial this much detailed. People used to cover simpler things but you are really something. trust me this playlist will gonna have more or infinite views because you really put great efforts to gather this much info at one place. REALLY HELPFULL❤❤ The fun fact is your 5 min video takes my 20 minutes to watch and practice takes some other time but the doesn't matter as long as your content is whoa!!! Loved it.
Thank you, that means a lot to me. Yea I talk fast & have made mistakes during editing but am constantly improving. I like to be more detailed because when I learn something new I like to get as much details as I can and it's not easy to find tutorials that go in that much detail, most just cover the surface or basics.
Thank you. The second and third sections contain more advanced videos. There is a link in the description to the GitHub repo that lists all videos in the series.
Happy to see the guys in the comments that are appreciating you,You do really deserve it man.Please keep it going master.I can not wait to get to the project tutorial.
Wow. It's now I'm seeing that we worked with some of these array functions. So handy to be familiar with array functions. Didn't know I didn't comment on this lesson. sai! Thanks alot Gio
This tutorial on array functions was very chewy, in a good way. Working that spaceship operator into the callback function really helps me to understand how to use it. is till a bit abstract to me, but your examples and explanations are making it much easier to grasp. Looking forward to putting all this foundational knowledge into use in a project! Thanks again for making this course available to everyone.
Cant' get how usort works, I googled and seen the docs but still is unclear. What is not clear is $a and $b who are exactly? How does it work? It's an array of four elements so I understand that if I have 2 arguments and I need to sort all 4 elements usort loops it through? Once for example I start with 3 equal to 3 is 0 , this zero what does it means? After we have 3 > 1 so it returns 1 , true so being greater it will have a greater position in the new array and so on for the other elements?
$a and $b are 2 elements from array that you are comparing, if $a is < $b then you return -1 meaning that $b is higher, if $a is > $b then you return 1 because $a is higher, if they are equal you return 0. usort loops through it basically & passes the 2 elements into the callback for which you write the comparison for & decide how they should be compared. (-1, 0 and 1 are just values that determine how element should be sorted in the array)
When we compare like with greater than operator php will convert the data type and then do the comparison. is there any way here to do strict comparison ?
Don't think there is a native way to do strict greater than or less than comparison. However, you could use strict types and accept integers in function for example, that way you know that you are comparing 2 integers. Just be sure to enable strict mode so that if you pass string instead of integer it gives you error. If you don't want strict types then you should at least cast to appropriate data type before comparing, so (int) $x, (int) $y and then $x < $y
edit: oh maan now I get it, 'fn' is a keyword in php, for declaring anonymous functions I thought it was just a random function name __________________ I am getting an error, with the arrow function inside the array_reduce unexpected => although it is the same code as your's I don't know what am I missing
10:53 my code: $ar1 = ['a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5]; $ar2 = ['f'=>4,'g'=>5,'g'=>6,'h'=>7,'i'=>8]; $ar3 = ['l'=>3,'m'=>9,'n'=>10]; $new_ar = array_diff($ar1,$ar2,$ar3); output: array(3) { ["a"]=> int(1) ["b"]=> int(2) ["e"]=> int(5) } why does it show ["e"]=>int(5) if 5 is present in $ar2? I'm confused because I can't get the same output with the same code.
Yup, sorry for the late reply, RUclips marked it as a spam for some reason, just found it. But yes you are correct because the key is same 'g' the second one overwrites first so you end up with 'g' = 6
Language structs are keywords kind of hardcoded to PHP, also known as tokens. Things like if/else, isset(), echo() are structs for example. You can see list of keywords here: www.php.net/manual/en/reserved.keywords.php
Hello. Thank you for the video. Do you know where is the link to download the code of the course. The guide you provided is a guide of the topics but I would like to get the complete course code.
Hello. There is no source code for some of these topics. Later in the course we work on project and link to repo is in the description of those videos. Keep watching and you'll get there
Is there anything like this in php as how it is in python without using loop; num = [4, 7, 9, 0, 2] print num[0:2] This is to print from index 0 to index 2 which the output is 4, 7, 9
no no no, im only learn things and you told me arrow array fun inside array fun... what the hell, why you complicate this so much. Must find simplified explanation. ...you can also start from 500 ....WHY? What for ??? i think you are tired to explain thing and just doing bla bla bla... to start new video asap.
Seems like this series is not for you. Feel free to watch something else. Arrow function is just another type of function which we covered earlier, so maybe you missed that video or you skipped it? I also don't understand what you mean by 500, can you be more specific? If you are here to just complain, then move on to other videos, there are plenty of PHP videos on RUclips so hope you find something that is more suited for you. Cheers
I agree with most of the comments. This course is great, because you go into detail about things and explain very clearly. It's great to have a solid grasp of the language. Thank you for this great contribution that most programmers will surely appreciate a lot!!!
Thank you 🙌
Once again, you don't disappoint.
Best tut on PHP arrays ever made !
Hope we're doing some simple/cool PHP project in the near future.
Thank you 😊. Yes we'll do a project soon.
I am new to php but not to programming. No doubt this course is a complex one and so quick but still I love it because you skipped nothing and discussed everything.
I still don't believe that how you never skipped any point. You are the real dude of PHP. I envy the juniors who works under you because they are lucky to have such a wonderful mobile chatgpt of PHP like you.
I have never seen any language 's tutorial this much detailed. People used to cover simpler things but you are really something.
trust me this playlist will gonna have more or infinite views because you really put great efforts to gather this much info at one place. REALLY HELPFULL❤❤
The fun fact is your 5 min video takes my 20 minutes to watch and practice takes some other time but the doesn't matter as long as your content is whoa!!! Loved it.
Thank you, that means a lot to me. Yea I talk fast & have made mistakes during editing but am constantly improving. I like to be more detailed because when I learn something new I like to get as much details as I can and it's not easy to find tutorials that go in that much detail, most just cover the surface or basics.
@@ProgramWithGio this is what makes your content special
Just love my evenings with Gio 📚📖
💙💙
Probably one of the best Php tuts going around. Would love to see more advanced Php videos. Keep it up 👍🏻
Thank you. The second and third sections contain more advanced videos. There is a link in the description to the GitHub repo that lists all videos in the series.
Happy to see the guys in the comments that are appreciating you,You do really deserve it man.Please keep it going master.I can not wait to get to the project tutorial.
I appreciate that, thank you 🙌
your course have lot of complexity and you are going by your own pace
There are many other courses that you could try
Only halfway through, amazing guide thank you!!!
Thank you 🙌
Thank you very much for the great efforts put in this great course. I enjoy every minute of it.
Super happy to hear that, thank you
dude, u're extremly awesome
You are! 💙
thanks for all man, you´re the best!!!
💙💙
Thank you very much. Best tutorial on PHP arrays ever made !
Greetings from Bangladesh.
Greetings 👋. You're welcome and thank you 🙌
This video is much more comfortable to digest if you don't edit out silence.
I agree & I apologize, it was an editing mistake on my end. Gets better in third section.
This course is amazing! Thank you very much, you are helping me a lot in this new area that I have just entered! Greetings from Brazil, my friend!
Great to hear, welcome & thank you 💙
Thank you very much friend, I have a hard time understanding this about php.
Greetings from Chile.
You're welcome, thank you 🙌
Thanks
You're welcome
Thanks for adding time stamps. They are very convenient.
You're welcome. I try to add them in lessons where it makes sense.
Wow. It's now I'm seeing that we worked with some of these array functions. So handy to be familiar with array functions.
Didn't know I didn't comment on this lesson. sai! Thanks alot Gio
It has certainly been a long journey, glad you like it
Thank you!
I would add explode and implode functions to this lesson. Great content as usual!
Thank you
Best tutorial on PHP 😍😍😍😍😍
Glad you think so, thank you 🙏
Great, thank you so much.
You're welcome
3:15 -- Gio says "array keys are not preserved", but as demonstrated, he means to say that the original keys "are preserved".
Oops, yup. Nice catch
This tutorial on array functions was very chewy, in a good way. Working that spaceship operator into the callback function really helps me to understand how to use it. is till a bit abstract to me, but your examples and explanations are making it much easier to grasp.
Looking forward to putting all this foundational knowledge into use in a project!
Thanks again for making this course available to everyone.
You're welcome & thank you, glad you liked it 🙌
I appreciate all of your hard work, and waiting for some framework tuts in this super mode impatiently.
Thank you 💙
Thanks. Great explanation
Great video! Many thanks! :)
Thank you 💙
I have learned a lot from your videos. Thanks a million!
Happy to hear that 💙
the best
Thank you 🙌
Thank you for your effort in conveying the information.. God bless you
You're welcome, thank you 🙏
Great lesson! Thanks!
Glad you liked it!
This lesson was 10 pages long with 25+ examples!
Each of these videos took a lot of effort & time to make :)
Great.
💙
Very helpful tutorial .
Glad it was helpful!
Thanks. Your video helped me a lot!
Glad to hear it. You're welcome
Finaly got how to use array_reduce, will also use it more often in JS. Great tut, lets see whats next :)
Glad to hear that
Thank you Gio. Please how do you advice we practice while following this wonderful series
Write the same code on your own and play around with it
thanks for the video
You're welcome 👍
Very good and informative tutorial i have ever seen.thank you dear gio.. Keep it up
Glad you like it, thank you 🙏
Thank you
You're welcome
amazing as always ✨
Thank you 🙌
Cant' get how usort works, I googled and seen the docs but still is unclear.
What is not clear is $a and $b who are exactly? How does it work? It's an array of four elements so I understand that if I have 2 arguments and I need to sort all 4 elements usort loops it through? Once for example I start with 3 equal to 3 is 0 , this zero what does it means? After we have 3 > 1 so it returns 1 , true so being greater it will have a greater position in the new array and so on for the other elements?
$a and $b are 2 elements from array that you are comparing, if $a is < $b then you return -1 meaning that $b is higher, if $a is > $b then you return 1 because $a is higher, if they are equal you return 0. usort loops through it basically & passes the 2 elements into the callback for which you write the comparison for & decide how they should be compared. (-1, 0 and 1 are just values that determine how element should be sorted in the array)
@@ProgramWithGio ok it is clearer, thank u so much gio, really , u've done a wonderful job with this course!
@@rosarioveneruso9928 you're welcome. Thank you 🙌
When we compare like with greater than operator php will convert the data type and then do the comparison. is there any way here to do strict comparison ?
Don't think there is a native way to do strict greater than or less than comparison. However, you could use strict types and accept integers in function for example, that way you know that you are comparing 2 integers. Just be sure to enable strict mode so that if you pass string instead of integer it gives you error. If you don't want strict types then you should at least cast to appropriate data type before comparing, so (int) $x, (int) $y and then $x < $y
@@ProgramWithGio Thanks
Great!
edit:
oh maan
now I get it, 'fn' is a keyword in php, for declaring anonymous functions
I thought it was just a random function name
__________________
I am getting an error, with the arrow function inside the array_reduce
unexpected =>
although it is the same code as your's
I don't know what am I missing
Heh, yup fn is a keyword, glad you figured it out 👍
super helpful. But i think we may need a detailed video of array functions and with a slow pace :P
10:53
my code:
$ar1 = ['a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5];
$ar2 = ['f'=>4,'g'=>5,'g'=>6,'h'=>7,'i'=>8];
$ar3 = ['l'=>3,'m'=>9,'n'=>10];
$new_ar = array_diff($ar1,$ar2,$ar3);
output:
array(3) {
["a"]=>
int(1)
["b"]=>
int(2)
["e"]=>
int(5)
}
why does it show ["e"]=>int(5) if 5 is present in $ar2? I'm confused because I can't get the same output with the same code.
Pardon, now I see, both 5 and 6 has id of 'g', that's why.
Yup, sorry for the late reply, RUclips marked it as a spam for some reason, just found it. But yes you are correct because the key is same 'g' the second one overwrites first so you end up with 'g' = 6
can we make destructuring with associative arrays too?
Yes in PHP 8.1
okey, thanks for your answer Gio.
Difference between Language construct vs functions ?
Language structs are keywords kind of hardcoded to PHP, also known as tokens. Things like if/else, isset(), echo() are structs for example. You can see list of keywords here: www.php.net/manual/en/reserved.keywords.php
what is difference between implode and explode
Implode joins array into a string while explode splits string into an array
great work
Thanks 🔥
Hello. Thank you for the video. Do you know where is the link to download the code of the course. The guide you provided is a guide of the topics but I would like to get the complete course code.
Hello. There is no source code for some of these topics. Later in the course we work on project and link to repo is in the description of those videos. Keep watching and you'll get there
@@ProgramWithGio Thank you for the course and for the answer!
Is there anything like this in php as how it is in python without using loop;
num = [4, 7, 9, 0, 2]
print num[0:2]
This is to print from index 0 to index 2 which the output is 4, 7, 9
Not yet
@@ProgramWithGio Alright, thank you so much
🙆♂
🙌
speedrunning PHP in 1-2 monthes in order to get job
You got this!
no no no, im only learn things and you told me arrow array fun inside array fun... what the hell, why you complicate this so much. Must find simplified explanation.
...you can also start from 500 ....WHY? What for ???
i think you are tired to explain thing and just doing bla bla bla... to start new video asap.
Seems like this series is not for you. Feel free to watch something else. Arrow function is just another type of function which we covered earlier, so maybe you missed that video or you skipped it? I also don't understand what you mean by 500, can you be more specific?
If you are here to just complain, then move on to other videos, there are plenty of PHP videos on RUclips so hope you find something that is more suited for you. Cheers
Thanks
You're welcome
thank you!
You're welcome