#TIL you can call an object like a function in #PHP.
todayilearned.net/2025/03/call…
Call an object like a function in PHP using invoke | Today I Learned
In PHP, you can "call" an object like a function. The class just needs to implement the __invoke magic method.Camilo Bravo (todayilearned.net)
Dieser Beitrag wurde bearbeitet. (2 Wochen her)
Larry Garfield
Als Antwort auf Camilo Bravo • • •I like using it for single-action controllers.
Or single-method event listeners. It's even the recommended approach for Tukio.