Learn PHP: Anonymous functions

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

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

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

    Nice explanation, simple and straightforward.

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

    I spend half hour and number of different codes just to figure out what mistake I am doing and in the end, my mistake was that I wasn't putting semicolon after right curly brace.

    • @gabrielr.7423
      @gabrielr.7423 6 ปีที่แล้ว

      HAAHA! Me too... sucks.,

  • @devlucian
    @devlucian 9 ปีที่แล้ว

    you really like number 5, thank you for tutorials

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

    You don't undestand why Closures exist... They are not meant to just be function with a $ variable... If you are calling an anonymous function multiple times then you are doing it wrong. Anonymous functions are mainly there for code you only need to run once, and the main advantage is encapsulation of the variables inside...

    • @DarknessOverpowering
      @DarknessOverpowering 9 ปีที่แล้ว

      DrakenKin Basically with closures you have the encapsulation of functions without the disadvantages of polluting the global space with a function you will only run once. That's their ideal, and dare i say their only real utility.

  • @MrMacpluto
    @MrMacpluto 10 ปีที่แล้ว

    thanks for this. cheers.

  • @wxd3116
    @wxd3116 9 ปีที่แล้ว

    1 dislike? Hater...