Anonymous Functions and Closures in PHP

PHP
Anonymous Functions and Closures in PHP
Image generated by ChatGPT (DALL·E)

If you are used to switch between JS and PHP programming, it obviously happened to you to miss some of JS flexibility in PHP. I felt it every time when declaring a callback function , being eager to apply something from JS like that...