Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Definitely possible, but that's a bit "magic". It's nicer not to have to rely on methods being named exactly a certain way.

There was a discussion on reddit about this exact same thing, shows that attributes lets you bind multiple events to the same listener more easily: https://www.reddit.com/r/PHP/comments/jgkp2r/php_8_before_an...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: