In JavaScript, you can define anonymous functions that are executed immediately:
(function () { /* do something */ })()
Can you do somethin
This is the simplest for PHP 7.0 or later.
php -r '(function() {echo 'Hi';})();'
It means create closure, then call it as function by following "()". Works just like JS thanks to uniform variable evaluation order.
https://3v4l.org/06EL3