5 ms·
Its a quirky little language and the early versions weren't great. The language can be inconsistent in places, and embedding php in the html made for a rapid th
by acomjean 8y ago
Its a quirky little language and the early versions weren't great. The language can be inconsistent in places, and embedding php in the html made for a rapid though sometimes trying experience. Its keeps backward compatibility which keeps those quirks in there. (though with new 7 series php versions older stuff is starting to break.)
Someone wrote an article with a title like "php a language with terrible design" that got traction.
I like the language and with the right framework and templating engine its a pleasure. (I'm moving code from silex to symfony).
I've been to a fair number php meetups and frankly people there seem to be end result focused not so concerned with the language. Frankly I think PHP doesn't have as strong a fan club as ruby/python, which are decent languages but they too come with their own quirks.
- gnarcoregrizz 8y ago"and embedding php in the html made for a rapid though sometimes trying experience." Funny, that is React/JSX's biggest sell
- nprateem 8y agoReact can't execute arbitrary database queries.
- gdfasfklshg4 8y agoCan too! {e = () => ajaxCallToMutateDatabase()} Or something similar... It's just people don't do it because it is a bad idea!
- Aeolun 8y agoI’m sure you can use the all JS mysql client to connect directly from your client app to your database.
- nprateem 8y agoWell yes if you're stupid enough to directly expose your DB to the world then it's technically possible, but barring such idiocy there's arguably more risk of a DB hack through PHP than client side JS in most architectures.
- mixedCase 8y agoReact can do SSR. You can use JSX on the backend for rendering pages just like on PHP.
- ggregoire 8y agoNot really comparable tho. In React, the JS in the HTML is to make loops and conditional rendering, i.e. presentational logic, like in any other templating system. In PHP, you can embed business logic and database accesses in the HTML.
- Aeolun 8y agoYou can do the same in your React render method I suppose, though it’s a bit harder since you are not attached to the server.
- likeclockwork 8y agoJSX adding HTML literals to JS is fundamentally different than embedding PHP in HTML.
- type0 8y ago> Frankly I think PHP doesn't have as strong a fan club as ruby/python, which are decent languages but they too come with their own quirks. The reason quite possibly is that those are joy to use where PHP isn't. In my mind the developer happiness should be on top of the list, also the syntax is still ugly however you look at it. The versatility of Python is unmatched. Ruby allows me to do things I could only dream of in other languages, in PHP those dreams are nightmares.