15: Anonymous Classes In OOP PHP | Anonymous Explained | Object Oriented PHP Tutorial | PHP Tutorial

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

КОМЕНТАРІ • 39

  • @salmanmansoor1272
    @salmanmansoor1272 3 роки тому +2

    im from Pakistan . i learned procedural php from an institute here and landed on this playlist to learn the object oriented PHP. i just wanted to tell you that in my 16 years of education career. i have never seen a better teacher than you brother. i have 3 videos to go. already sunscribed you. will look forward to more of of your tutorials. This stuff that your teaching for free is charged very heavy in my country. Thanks alot.

  • @nikolav6350
    @nikolav6350 5 років тому +10

    Hey can you make videos about design patterns in PHP that we need to know, i have already tried to learn but your explanations are so great to follow and learn better.

  • @voidcacti
    @voidcacti 5 років тому +14

    You've taught me so much, thank you!

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

    you are a great teacher I wish all of teachers were like you

  • @AvaneeshKumarSingh
    @AvaneeshKumarSingh 5 років тому +3

    You are doing a great job.
    Keep it up. Thanks.

  • @patrik5123
    @patrik5123 3 роки тому +3

    I'd like to know a real-example of when "taking up too much memory" would be a bad thing and an anonymous class would be a better choice. I'm struggling to see the use tbh because servers aren't usually lacking RAM these days. And besides, how many k could a class really take up?..

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

    Eldest brother of the Peaky gang, Daniel Shelby 💣😂

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

    Thank you men👍

  • @SumitPMakwana
    @SumitPMakwana 5 років тому +2

    Why you didn't add it to your OOP PHP Tutorial Playlist?

  • @user-bi7nq4nj7q
    @user-bi7nq4nj7q 3 роки тому +1

    Thank you for these amazing lessons, I like your positive and upbeat demeanor. I have a question: Even though the example in your lesson works, When I look into the output on the BuyProduct.class.php, it says it cannot find the Visa class. normally, it would require some sort of inclusion of the paymenttypes.abstract.php for it to gain access to those methods from inside the BuyProduct.class.php. does the includes_once assigned in the index.php bridge that gap itself by extension? can you explain how the index.php works in this case? Thank you in advance!

  • @ProgrammingwithPeter
    @ProgrammingwithPeter 5 років тому

    You're doing a great job on explaining!

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

    Big thank from syria Bro
    you are doing great
    thank you

    • @mr.x667
      @mr.x667 9 місяців тому

      حاسس سوريا طلعت عالتلفزيون بسبب الكومنت تبعك 😂😂😂

  • @nac9880
    @nac9880 5 років тому +1

    Lol I thought this was an old video.
    Can you do a design pattern playlist? I am trying to understand solid, phptherightway and these patterns like activerecord, repository, DAO etc but it is tough to understand yet

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

    I think anonymous class can be relate to Singleton design pattern, I can see in anonymous class you can only create a single object and in singleton its the same.

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

    Looking like Thomas Shelby. Great tutorial though.😃

  • @bitmammothOG
    @bitmammothOG 5 років тому +1

    Soooo close to 200k Subs! :D

  • @aaronpaulsisracon3098
    @aaronpaulsisracon3098 5 років тому

    Coz im having a hard time doing it. I watched a lot of your yt tutorials. I hope u can make one abt my concern. Thank you!

  • @dantewins
    @dantewins 5 років тому

    please make a video on how to store multiple data with implode or something

  • @mdsafikulislam9113
    @mdsafikulislam9113 5 років тому

    Thank you so much !

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

    tysm

  • @ademineshat
    @ademineshat 5 років тому

    Great Thank you!

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

    I have a quick question and I did not hear the reason the short video here. In the video on line 15 there is a }; and this is very unusual to see with all the coding and videos I have watched with you. Is this how abstract class sections are closed like a standard PHP line would. Like echo "Hello World!"; I found this intreging and with no explication as to why this is. I was left standing beside myself. So is this a typeo or is this required with Abstract Class?

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

      It is because we created the class by assigning it to a variable. 🙂 So the ; at the end is to close the variable.

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

    I'm finding that the second word in the name extension needs to match the name of the folder it's in exactly otherwise I get an error, I'm using Visual Studio Code.

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

    When I try to use an anonymous class I get an error of “unexpected class (T_CLASS)” in the IDE and the webpage just shows a 500 error

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

      I found if I add that semicolon after the last } in the anonymous class, the webpage works, but the IDE still shows an error - that is strange that that semicolon is needed ??? You don’t normally need a semicolon there for a normal class - why is that needed?

  • @TristanPope
    @TristanPope 5 років тому

    Are you still using the Brio?

  • @nikolav6350
    @nikolav6350 5 років тому +2

    I don get when in real life we would use it, why don't we just create a function that we need if we want to use it once if we don't want to create class and store in memory.

    • @Dani_Krossing
      @Dani_Krossing  5 років тому +4

      If you just need one function then sure, use a function. However if you need to perform multiple methods and store multiple properties, then an anonymous class gives you more structure and takes up less memory.
      In my lesson example I did only have a single method in my class, but that was just an example.

    • @nikolav6350
      @nikolav6350 5 років тому +1

      @@Dani_Krossing Thank you for the answer, your videos are amazing !!

  • @adonishomefitness
    @adonishomefitness 5 років тому

    I need help im trying to find out how to add google adsense onto my website but all the videos i watch are for wordpress i dont use wordpress only html,css and javascript

  • @lemarhenry7778
    @lemarhenry7778 5 років тому

    bro what does this error mean ? mysqli_connect(): (HY000/2002)?

  • @moritzluckner9491
    @moritzluckner9491 5 років тому

    What program is this?

  • @adonishomefitness
    @adonishomefitness 5 років тому

    I need help

  • @edgar-mmxxiii
    @edgar-mmxxiii 3 роки тому

    So manny types of classes! Ridiculous programming language.