Hacker News new | ask | show | jobs
by phplovesong 488 days ago
So PHP forces you to put everything in class? Thats hilarious!
1 comments

Yes, because functions can’t be autoloaded and you can’t put variables and constants inside a namespace. But it isn’t hilarious, it is because of legacy.

Now there are proposals to fix function autoloading but it won’t fix variables and constants.

One way to do it better is to implement modules.