PHP Function Parameters - Named Arguments - Variadic Functions & Unpacking - Full PHP 8 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 140

  • @alaa3877
    @alaa3877 4 หลายเดือนก่อน +4

    I hope you get the recognition you deserve. when one searches for a php course, yours should be the firs. quality course

    • @ProgramWithGio
      @ProgramWithGio  3 หลายเดือนก่อน

      Appreciate it, thank you

  • @David-ok9vt
    @David-ok9vt ปีที่แล้ว +28

    These videos are soooo good. Gio is so concise with his explanations, not a single word is ever wasted and he always uses exactly the correct terminolgy. I wish I could have have his brain for a day!

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว +11

      Thank you very much 💙. I just organize & prepare lessons well beforehand.

  • @chriscjjones8182
    @chriscjjones8182 ปีที่แล้ว +3

    Named arguments will be a very useful new feature and I didn't know about splat before today, that will save lots of time

  • @thepenguin11
    @thepenguin11 2 ปีที่แล้ว +4

    Named arguments are game changer.

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +1

      It is definitely a great feature

  • @gadlabiod2072
    @gadlabiod2072 2 ปีที่แล้ว +18

    This is like a rigorous book in video form. Well done.
    I think PHP might be the best scripting language around right now.

  • @adoughdough
    @adoughdough ปีที่แล้ว +3

    Named argument is a nice neat feature. I'd be happy to use it. Great lesson yet again!

  • @sajidmehd
    @sajidmehd 4 หลายเดือนก่อน +1

    One of the best lectures I found on TH-cam, and I really appreciated it.

  • @andresfelipeperezrueda9026
    @andresfelipeperezrueda9026 2 ปีที่แล้ว +2

    Deam PHP 8 is GOOOOOD

  • @ollienicholson
    @ollienicholson 3 หลายเดือนก่อน

    A lot of cross over with Python which makes my life better. Thanks Gio!

  • @Nekoeye
    @Nekoeye 3 ปีที่แล้ว +15

    Thank you Gio. Really appreciate this whole series. Will do a review on first video once I finish all available episodes.

  • @NicoleOrton1
    @NicoleOrton1 ปีที่แล้ว +1

    named arguments are a game changer for me

  • @jessieren6476
    @jessieren6476 2 ปีที่แล้ว +4

    I love Gio's videos, the speed is good which can save my time.

  • @johna2193
    @johna2193 ปีที่แล้ว +4

    Very enlightening. I can see how named arguments can make life a lot easier, especially when one has to maintain code.

  • @donmikele07
    @donmikele07 ปีที่แล้ว

    It's a very useful feature. It happened to me many times to must do something like fnc('new_value_1', 'default_value_1', 'default_value_2', 'default_value_3', 'default_value_4', 'new_value_2') {...}. Now I can do like this: fnc(first_parameter: 'new_value_1', sixth_paramtere: 'new_value_2'). You are the wizard! 👍👍👍

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว +1

      Yup, one of the best usecases 👍

  • @veltive3268
    @veltive3268 2 ปีที่แล้ว +3

    Every beginner with PHP should watch this course. And even people who have been developing for years.
    You explain simple things so well, and also show a lot of hidden gems which I didn't even know after developing with PHP for 4 years.
    And yet, a beginner would also understand those things.
    I wish I had this channel when I just started. Awesome job.

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +1

      Thank you, that means a lot to me 💙💙

    • @danish9906
      @danish9906 7 หลายเดือนก่อน +1

      Sir is it worth investing time in php and laravel as of now everyone is choosing node.js ...are there still jobs for freshers in php ?

  • @Vitalii-m6r
    @Vitalii-m6r ปีที่แล้ว

    Functions are very powerful. Thanks for the lesson!

  • @techjavaid6177
    @techjavaid6177 3 ปีที่แล้ว +3

    You're a God of php...
    Love every video ❤️❤️❤️ more power to you man

  • @keremardicli4013
    @keremardicli4013 ปีที่แล้ว

    I have learned how to use named arguments. Thanks allot Gio.

  • @glyakk
    @glyakk 2 ปีที่แล้ว +1

    This video is loaded with good information. You do go though it quick so I had to rewatch some parts a few times but I like how you explain things.

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +1

      Thank you 💙. Yea sorry about that, I was new to editing & cut out all the empty spaces making it seem like I don't breathe at all in addition to me speaking a bit faster. It gets better towards third section

  • @DAG_r8
    @DAG_r8 ปีที่แล้ว

    PHP 8 is awesome cant wait to work with named arguments in function using the ... makes a function even more dynamic/ abstract. Thanks a lot for this

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      Yup, love the way PHP is heading. Thank you

  • @jewgienijbrzozowski8451
    @jewgienijbrzozowski8451 2 ปีที่แล้ว +1

    Im still here, thanks for the course. Its great!

  • @anatsap9599
    @anatsap9599 ปีที่แล้ว

    Love your course!
    I have a few years of experience and before this video, I knew almost everything (I just forgot something like insertions into HTML as it has no use for me)
    But somehow, I had never heard of Named Arguments and I wish I had watched this video 1.5 months ago, before refactoring a huge module with hundreds of usages that had the exact issue with new required param before 4-7 non-required.
    You're doing an amazing job. I feel like soon I might have to stop playing the video at 1.5 speed and start thoroughly absorbing your teachings :D
    Many thanks!

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      Glad to hear you like it, thank you 💙💙

  • @karam0101
    @karam0101 2 ปีที่แล้ว

    I feel like I've found a treasure, can't thank you enough

  • @lotuslando1994
    @lotuslando1994 ปีที่แล้ว +1

    Named arguments and the ... operator were new to me. Both were explained really well.👍
    I like how you have named timestamps throughout the video so I can easily jump back to something for review.
    I find the speed comfortable and don't think you need to change anything personally. If I don't feel ready to move to the next concept, I just hit pause.
    Thank you so much for always providing direct links to the PHP documentation for each of the concepts you cover. 🙂

  • @CtrlGame
    @CtrlGame 3 หลายเดือนก่อน

    best programming course (not just for php) but in general. gg bro!

  • @BrenIrwin
    @BrenIrwin 2 ปีที่แล้ว +1

    I really liked the named argument approach. This feels like its almost providing an alternative to overloading (assuming you're setting default values and using the ... operator). I can seeing using ... and arrays with named indexes being incredibly handy. Thank you for the great tutorials videos. I know PHP and have coded it for years, but keep coming back and bingeing your videos as I keep learning new nifty tricks. Cheers!

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว

      Glad to hear that, thank you 🙏 💙

  • @lairotuT-Tutorial
    @lairotuT-Tutorial หลายเดือนก่อน

    One lesson greater than the other... big big respect!
    May I ask how long it takes for you to plan/prepare a whole series like this or you laravel series and how long then to plan/prepare one lesson and then again how long to record the lesson?
    It must be overwhelming effort you push into this! Thanks for all this work!

    • @ProgramWithGio
      @ProgramWithGio  หลายเดือนก่อน

      Takes a long time. You will notice the dates when these videos are published & how far apart some of them are. The PHP series was recorded & published over the span of 2 years I think. Laravel series wont be as long but I expect it to take around a year as well. Note that I dont work on this full time so I only work on it on my free time which is one of the reasons it takes this long. Each lesson depending on complexity on average can take 1-2 weeks

    • @lairotuT-Tutorial
      @lairotuT-Tutorial หลายเดือนก่อน

      @@ProgramWithGio Thanks again for all this effort! The results are rewarding... at least for your audience 🙂

  • @369-davian
    @369-davian 2 ปีที่แล้ว

    in a lot of case variables is defined in a simple response, but this is very informative !thanks a lot master Gio

  • @petruciucur
    @petruciucur 2 ปีที่แล้ว +1

    Very, very well explained, thanks.

  • @quranPeace-j6s
    @quranPeace-j6s 7 หลายเดือนก่อน

    thanks a lot we can't use Unpack args after named args.. thanks again for these great videos

    • @ProgramWithGio
      @ProgramWithGio  7 หลายเดือนก่อน

      You're welcome, thank you

  • @jesiooooo
    @jesiooooo ปีที่แล้ว

    The best wideos about php i have ever seen :)

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 2 ปีที่แล้ว

    named argument is going to save me a lot of headache!!

  • @Armando-px8hi
    @Armando-px8hi ปีที่แล้ว

    What a great lesson, never heard of such things.The best once again, I am never gonna be tired of saying it.Just one question please GIO,is it gonna be usable in big php project or we just need to know the basics?

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว +1

      Thank you. Yes for sure, we even work on a real project at the end of the series

    • @Armando-px8hi
      @Armando-px8hi ปีที่แล้ว

      @@ProgramWithGio Got it, gonna be more serious on this lesson one more time. Actually I need the OOP part but in every video learning something new , that’s what you can call GOD tier developing 👍

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      @@Armando-px8hi heh, nice. Glad to hear 🙌

  • @ihebhamad1477
    @ihebhamad1477 ปีที่แล้ว

    Thank you for this great video !!

  • @AO-ct8js
    @AO-ct8js 2 ปีที่แล้ว

    Thank you Gio.

  • @exikoz
    @exikoz 3 ปีที่แล้ว

    This was really helpful, thanks. Liked and subscribed.

  • @ballpen9157
    @ballpen9157 ปีที่แล้ว

    that's a lot. enough for today. thank you.

  • @ahmedyasser571
    @ahmedyasser571 6 หลายเดือนก่อน

    so informative

  • @badeeesmandar2552
    @badeeesmandar2552 ปีที่แล้ว

    I really appreciate you for this course it's really helping me❤
    I have a question if I finished this course am I able to finish laravel after it any time sooner?
    Or it'll take so much time after it?

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      In my opinion yes, learning Laravel after completing this course should make it easier.

  • @dawidgrden2227
    @dawidgrden2227 ปีที่แล้ว

    game changing !

  • @ChandanG94805
    @ChandanG94805 6 หลายเดือนก่อน

    Amazing Sir

  • @WhiteSiroi
    @WhiteSiroi ปีที่แล้ว

    wow, thank you, very helpful,

  • @_chris_6786
    @_chris_6786 ปีที่แล้ว

    Thank you.

  • @gazianis7572
    @gazianis7572 3 ปีที่แล้ว +1

    good efforts

  • @nogafouz2174
    @nogafouz2174 2 ปีที่แล้ว

    thanks very much

  • @christiansosa5484
    @christiansosa5484 ปีที่แล้ว

    Thanks a lot!

  • @ilya_123__
    @ilya_123__ ปีที่แล้ว

    thank you!

  • @omaryahia
    @omaryahia ปีที่แล้ว

    ❤️ thank you

  • @dusko8989
    @dusko8989 2 ปีที่แล้ว

    Gio can you tell me what extension you use so that code editor automatically underline yousr "errors"? I find that very usefull
    Thanks

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +1

      I use phpstorm which is the IDE. It has that built in. Unfortunately it's a paid editor.

    • @dusko8989
      @dusko8989 2 ปีที่แล้ว

      @@ProgramWithGio thanks for answer Gio.Keep doing what you do best
      I have learnt a lot

    • @glyakk
      @glyakk 2 ปีที่แล้ว

      @@dusko8989 You can also use other editors (many of them are free like vscode) that will allow you to install extensions to give you much of the same 'linting' that phpstorm gives you.

  • @rxxt-sh1vj
    @rxxt-sh1vj 2 ปีที่แล้ว

    wassup bro Gio...whats the difference between Splat and Spread operator ?

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +2

      They are the same essentially, in php 5.6 I think they introduced 'splat' operator that allowed argument unpacking & then in php 7.4 if I'm not mistaken they added the same unpacking support to array expressions using the same operator, so when used in arrays they usually call it spread

  • @kenjohnsiosan9707
    @kenjohnsiosan9707 ปีที่แล้ว

    the name of the argument is the same as the name of the parameter, right?
    example:
    definition:
    function myFunction($parm1, $param2) {}
    invocation:
    myFunction(param2: arg2Value, param1: arg1Value)

  • @dusko8989
    @dusko8989 2 ปีที่แล้ว

    I am watching all the videos in this serises and they are great, but at this time they are geting to confusing and and fast for beginner or maybe i am to slow :).I think that it is not 100% beginner friendly
    Anyway great job i will try to keep up

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +1

      Thank you & I'm sorry to hear that it is a bit fast paced. I agree that on some videos I talk fast & they are a bit fast paced, this was my mistake during editing where I cut out empty spaces which make it seem like I don't breath at all. I've improved on this in recent videos where I leave those small spaces in & I also try to talk a bit slower.
      About the actual content, I think it is beginner friendly if you follow from the very beginning of the series & practice the things that you learn. If you are only just watching the videos without practicing then you will probably not remember most of the things by the time you get to the end of this series. The best way to learn is to practice, so even though I talk fast in these lessons, try to slow it down by clicking on the gear icon on TH-cam & select 0.75x speed or even 0.5x. Then pause whenever you need & try those things out yourself. If you have questions feel free to post or message me on Twitter & also try to research it yourself, PHP docs is your best friend. That is how you will get better at it.
      Good luck & let me know if you have any questions 💙💙

    • @dusko8989
      @dusko8989 2 ปีที่แล้ว

      @@ProgramWithGio thank you very much for what you are doing!

  • @mujibilla1749
    @mujibilla1749 ปีที่แล้ว

    bravo

  • @emekatimothyiloba699
    @emekatimothyiloba699 ปีที่แล้ว

    Great

  • @midclock
    @midclock 3 ปีที่แล้ว +1

    I watched many videos, I think that they are grew.
    Btw I suggest to speak a little slower, or at least do a little pause between each "section", to let the watcher read the code one more time.
    Thank you for these tutorials, they are very nice.

    • @ProgramWithGio
      @ProgramWithGio  3 ปีที่แล้ว +2

      Thank you. I tried improving on that in recent videos. You could also adjust play ack speed on TH-cam.

  • @irfanbagwala9683
    @irfanbagwala9683 3 ปีที่แล้ว

    Named arguments can be helpful in php inbuilt functions and our own code but if you we use external package and if some
    Changes are done in package and if We update it may result in error we must me very conscious in using it.

    • @ProgramWithGio
      @ProgramWithGio  3 ปีที่แล้ว +6

      True, but that would be a breaking change and they would document it in upgrade guide as a breaking change.

  • @yarik83men51
    @yarik83men51 3 ปีที่แล้ว

    Thx❤❤❤👌

  • @serbian4ever0
    @serbian4ever0 2 ปีที่แล้ว

    anyone know is it possible to have something like this 9:26 in VS Code where I can see highlighted as I pass the arguments the function needs ?

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว

      Someone help Filip please. I don't use vscode or I would help.
      Try Ctrl + shift + space when cursor is inside the parenthesis and see if that works

  • @robeeeeen
    @robeeeeen 2 ปีที่แล้ว

    Do you have paid course with advance Php? If yes please share the link.

    • @ProgramWithGio
      @ProgramWithGio  2 ปีที่แล้ว +4

      No paid course. This is the full PHP course from beginners to advanced PHP, you are finishing the first section which is beginners, there are 2nd and 3rd sections with more advanced topics. Check out the full playlist or the GitHub repo (link in description) for course outline with links to all videos.

  • @CharlesPlaysIQ
    @CharlesPlaysIQ ปีที่แล้ว

    I feel like my head is heavy🤕, is this normal, btw im from ph🤒

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      It's totally normal, take a break & come back to it with fresh mind

  • @sophiac4860
    @sophiac4860 3 ปีที่แล้ว +1

    got it: Splat Operator

  • @quantumastrologer5599
    @quantumastrologer5599 2 ปีที่แล้ว

    the fact that
    $arr = [1, 2];
    $x, $y = ...$arr;
    produces an error rutles my jimmies

  • @superheroshortss
    @superheroshortss ปีที่แล้ว

    There was one more thing, you cannot use position arguments after named arguments, position arguments must be defined first.

  • @dmitriykret8938
    @dmitriykret8938 3 ปีที่แล้ว

    +

  • @giorgighvianshvili1258
    @giorgighvianshvili1258 ปีที่แล้ว

    რა კარგად და თანმიმდევრულად ხსნი. ცუდია ინგლისური რომ არ ვიცი კარგად. :(

    • @ProgramWithGio
      @ProgramWithGio  ปีที่แล้ว

      მადლობა, არაუშავს თანდათან ისწავლი ინგლისურსაც და PHP-ს ერთად 🙂

  • @Netpilation
    @Netpilation 5 หลายเดือนก่อน

    bro we want more tutorials , love and respect from pakistan

    • @ProgramWithGio
      @ProgramWithGio  4 หลายเดือนก่อน

      Will be back soon 💙

  • @sherwancaris5199
    @sherwancaris5199 ปีที่แล้ว

    Thank you.