4 ms·
> "I really don't get why PHP is not more liked in hacker circles" To me PHP is an ugly language, with heaps of quirks and weird api's. The way it mixes markup
by gitgud 5y ago
> "I really don't get why PHP is not more liked in hacker circles"
To me PHP is an ugly language, with heaps of quirks and weird api's. The way it mixes markup and logic is gross.
That being said, I do like some parts of it. The way you compose pages by just writing "include" is nice. The way the server spins up processes for every request like a micro-service is nice.
PHP does have an elegant simplicity that many languages and frameworks lack these days...
- jonwinstanley 5y agoMixing markup and logic is strictly not done in the more modern frameworks like Laravel and Symfony, they use MVC similar to Rails. Wordpress does mix the two, but Wordpress is definitely not a good example for modern PHP development!
- cardanome 5y ago> The way it mixes markup and logic is gross. We don't do that any more. You separate logic and view like in any other language. In fact some people don't even use PHP for templating anymore but a domain specific language. (Though sometimes having a fully features programming language for templating can be nice so jury is still out.) Honestly I am more grossed out with the stuff that some modern frontend frameworks are doing these days, where there is not separation of styling, markup and logic anymore with that thing that is like html but not totally html. I see the advantages but not sure how this will turn out in the long run.
- xtracto 5y ago> To me PHP is an ugly language, with heaps of quirks and weird api's. The way it mixes markup and logic is gross. Kind of tangential, but I've found a similar thing in the React framework: After all these years working towards splitting UI with logic, React asks me to hardcode the graphical components in a return (<module1></module1><module2></module2>) function. It is something I just cannot grok. I prefer frameworks that let you separate the UI elements from the logic that drives them.