3 ms·
It doesn't even have to be 'sugar' like that. $content->closure() It could look at the registered methods, then scan for properties of that name that would be
by mgkimsal 15y ago
It doesn't even have to be 'sugar' like that.
$content->closure()
It could look at the registered methods, then scan for properties of that name that would be closures, then fall back to __call. You could add this to __call with __set() checks for assigned values being closures, but it's rather ugly to have to do that for all class definitions.