How to automatically load PHP classes using spl_autoload_register.

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 70

  • @johnrobertsonnocos2996
    @johnrobertsonnocos2996 4 місяці тому +4

    Haha your humor and accent are the perfect mix for the best tutorial in the world. This is hands down the funniest PHP tutorial I've ever seen :D

  • @hozay6552
    @hozay6552 2 місяці тому +1

    I came from the PHP documentation, and understood nothing, but this video made it so easy to understand. Thank you!

  • @dafa66
    @dafa66 4 роки тому +11

    I'm loving the simplicity of the DC definition!
    Great work DC and a wonderful compliment to the material on SCA

  • @makiccs
    @makiccs 3 роки тому +5

    Alright, this guy tutorials will help me get a job.
    Def. subscribing.

  • @thehunter11
    @thehunter11 4 місяці тому +1

    A real fella register automatically the DC definition !!

  • @jamesoduro6772
    @jamesoduro6772 2 місяці тому +1

    This was very helpful.

  • @asianeducationalconsultanc416
    @asianeducationalconsultanc416 3 роки тому

    Wow DC definition is definitely the easiest explanation to understand for even novices…👏🏻👏🏻👏🏻

  • @manishdeshpande
    @manishdeshpande 3 роки тому

    Simple and straight. Lovely. Thanks much.

  • @Laideroo
    @Laideroo 3 роки тому

    I had such a laugh during this tutorial. Also learned what I wanted to. Your accent is amazing brother!

  • @jovan_script
    @jovan_script 2 роки тому

    Thanks so much DC! Straight to the point!
    I got so confused by some loser on udemy with no idea what he's talking about, lol.

  • @judeleon8485
    @judeleon8485 2 роки тому

    Thanks David for demystifying this concept

  • @rikdhoedt6446
    @rikdhoedt6446 Місяць тому

    what a teacher !

  • @johnclaudio7617
    @johnclaudio7617 2 роки тому +1

    Great tutorial. Seriously.

  • @sergiboquerafuentes7134
    @sergiboquerafuentes7134 3 роки тому +1

    hahahaha, you are now my new hero. Thanks for the tutorial mate!

  • @abcz___hello
    @abcz___hello Рік тому

    amazing tutarial, also very fun😅🙏👏👏🙏🙏👍👍

  • @MBkingsoft
    @MBkingsoft 2 роки тому

    Lol you just got a new subscriber sir. You are amazing!

  • @farhanshah9765
    @farhanshah9765 Рік тому

    Good work Respected sir keep up it for the sake your junior like us all thank you ...

  • @caesarczech7920
    @caesarczech7920 2 роки тому

    This is Gerbil proof tutorial. Thanks.

  • @Ticked.-
    @Ticked.- 2 роки тому

    This video is awesome - subscribed!

  • @jujomoto
    @jujomoto 3 роки тому

    hi, great job DC, congratulations, nowdays, Im thinking about hello tutorial when you're learning, but the real life, in production, you find absolutly complicated code than hello world tutorial, please, keeping teaching us

  • @khejurbanglatv
    @khejurbanglatv 4 місяці тому +1

    enjoyed old movie actor voice

  • @mrbilchalan
    @mrbilchalan 3 роки тому +1

    hilarious style. liked it.

  • @jakubfrei3757
    @jakubfrei3757 Рік тому

    I just love your accent

  • @MTechnicsPiotrSygut
    @MTechnicsPiotrSygut Рік тому +1

    👍

  • @alkamahale6652
    @alkamahale6652 3 роки тому

    thank you it was helpful

  • @secure73
    @secure73 3 роки тому

    Yes, it is a jackpot!! thank you

  • @pavanobhan1105
    @pavanobhan1105 3 роки тому

    Thanks a lot buddy. Subscribed :)

  • @NotMarkKnopfler
    @NotMarkKnopfler Рік тому +1

    "You don't need to make life complicated." - Halle-effing-lujah.

  • @paulramura8126
    @paulramura8126 3 роки тому

    Thank you, Sir! ..... Well done!

  • @alvarocampos1495
    @alvarocampos1495 3 роки тому

    Thank you very much

  • @Holycrabbe
    @Holycrabbe 2 роки тому +1

    im not sure what the passed $class variable contains. I have some controler classes named "Name-contr.classes.php" and these does not seam to be included by the autoloader. Is the "-" character illegal in the namegiving, and if so, what can i use instead ?

  • @markmark1305
    @markmark1305 3 роки тому

    Интересная подача, спасибо!

  • @trollflix
    @trollflix 3 роки тому

    04:20 man u killed me ... ahahha 🤣🤣🤣 Thanks a lot for the tutorial!

  • @Ahmad-td4ck
    @Ahmad-td4ck Рік тому

    I love the simplicity, $GRATITUDE = "Thanks Man, That helped"; 😁😁

  • @puneetsharma1437
    @puneetsharma1437 2 роки тому

    I like to ask a question i like to add a component class with many function as component folder

  • @reinielandres3597
    @reinielandres3597 2 роки тому

    So good

  • @sunilmahur9024
    @sunilmahur9024 4 роки тому +1

    Hello David, How are you!
    Can you please make some tutorials on Cricket Match scoring website in php and ajax. Because Teaching way is awesome. Last three year, I am following your videos/tutorials.
    Thanks....👍🏻

    • @davidconnelly
      @davidconnelly  4 роки тому +3

      Sounds good. Only one problem. I don't understand the game of cricket.

    • @sunilmahur9024
      @sunilmahur9024 4 роки тому

      @@davidconnelly ok no issue, thanks ! have a great day.....👍😊

  • @tommygun9069
    @tommygun9069 3 роки тому

    i like these videos

  • @massiresogore7906
    @massiresogore7906 2 роки тому

    Thunk you very munch

  • @abhijeetmandal3822
    @abhijeetmandal3822 2 роки тому

    Golden

  • @Sdirimohamedsalah
    @Sdirimohamedsalah Рік тому

    What make confusing is the pass or reading code by the interpreter. We all learned that a computer reads from top to bottom and we don’t see where and when the auto loader called. I my opening the right explanation is to consider it as listener.

    • @davidconnelly
      @davidconnelly  Рік тому

      Yes! That's a good way to think of it. Are you a JavaScript developer by any chance?

    • @Sdirimohamedsalah
      @Sdirimohamedsalah Рік тому

      @@davidconnelly I do some JavaScript -vanilla- but in general I’m php backend dev. What’s new about your framework? The project still in dev ?

  • @chrishuhn5065
    @chrishuhn5065 4 роки тому +2

    Having all php files of a project in the same directory is going to get messy fast. What you've shown here is fine for small projects, but we all know that simple small projects never stay that way. ;-)
    Please do not stop here and make a follow-up video on how to use this simple autoloading method with sub directories and namespaces (for the lazy ones who can not be bothered to read php.net/autoload). It doesn't have to reimplement PSR-4 - which is confusing as hell for most beginners and doesn't really help.

    • @davidconnelly
      @davidconnelly  4 роки тому +2

      Keep watching, my friend. Just keep watching.

  • @Polca28
    @Polca28 Місяць тому +1

    dude your funny HAHAH

  • @SajidPuthawala
    @SajidPuthawala 3 роки тому +1

    Huhh...its work

  • @carruselabandonado4107
    @carruselabandonado4107 3 роки тому

    THANKS T.T

  • @simonmartin7487
    @simonmartin7487 2 роки тому

    i love you

  • @developement
    @developement 3 роки тому

    Lets say if I had 1000 classes would it be a good idea to run them all with that command?

    • @davidconnelly
      @davidconnelly  3 роки тому

      Well, let's put it this way. Take a trip to Trongate dot io and look at the benchmarks on the homepage.

  • @MrGigi-dz9cv
    @MrGigi-dz9cv 3 роки тому

    Soooo ... You write a function, that loads a file.
    Then, you write a function for the next file ...
    How that makes things easy ?

    • @davidconnelly
      @davidconnelly  3 роки тому

      Well, the idea is that we can declare classes here there and everywhere. This gives a sort of focal point where the classes are loaded.

    • @MrGigi-dz9cv
      @MrGigi-dz9cv 3 роки тому

      @@davidconnelly we could have written a function to do the same exact thing. Where is the new here ?

    • @davidconnelly
      @davidconnelly  3 роки тому

      @@MrGigi-dz9cv If you'd be able to show me, perhaps on GitHub, what you have on mind then I'd be delighted to check it out. I'm all in favour of questioning everything and just maybe you're into something.

  • @abcz___hello
    @abcz___hello Рік тому

    i was searching the google for DC meaning😂😂😂

  • @kamalCode
    @kamalCode 4 роки тому

    Sir, plz laravel 8 complete advanced tutorials

    • @davidconnelly
      @davidconnelly  4 роки тому

      No.

    • @kamalCode
      @kamalCode 4 роки тому

      Why

    • @davidconnelly
      @davidconnelly  4 роки тому

      @@kamalCode Because I've just spent two and a half years building a new PHP framework. If you want to learn Laravel, there's plenty of tutorials out there.

    • @kamalCode
      @kamalCode 4 роки тому +1

      New php framwork tuotorials plz

  • @PiotrSygutPL
    @PiotrSygutPL Рік тому +1

    👍