Learn PHP: Anonymous functions

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 8

  • @saiedtrefi7531
    @saiedtrefi7531 6 лет назад +2

    Nice explanation, simple and straightforward.

  • @devlucian
    @devlucian 10 лет назад

    you really like number 5, thank you for tutorials

  • @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.

  • @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 11 лет назад

    thanks for this. cheers.

  • @wxd3116
    @wxd3116 9 лет назад

    1 dislike? Hater...