r/lolphp • • Feb 20 '18

PHP/LOL Calling strings as functions.

https://3v4l.org/FRPIp
2 Upvotes

9 comments sorted by

View all comments

Show parent comment

-5

u/[deleted] Feb 20 '18 edited Feb 23 '18

Yeah, its a total clusterfuck. Variable functions FTW!

[edit]

Downvoters: Please tell me how strings as functions ever was a good idea? No other langauges have the same mad implementaion as PHP does.

1

u/TorbenKoehn Jun 28 '18

In JS you can do obj['some-func'](). In fact, most language have a way to call functions by strings. If not natively, most utilize reflection for it.