Understanding Closures in PHP (part 2)

preview_player
Показать описание
A detailed example of a closure inside a class.

Рекомендации по теме
Комментарии
Автор

Great video to help understand closures in php.

aamirsaleh
Автор

Anthony, very good example for explanation!

СергейПугачев-рч
Автор

i would define butter, milk, and egg as private properties for the object to make more sense in OOP. Because with your code people can access your properties. I didn't say it was wrong but you can consider it as a good practice. Good demonstration though.

namsir