3 ms·
To keep it simple, it was originally created as sort of a helper instead of a full-fledged language, and just kind of grew into that. As such, its early years w
by sfteus 8y ago
To keep it simple, it was originally created as sort of a helper instead of a full-fledged language, and just kind of grew into that. As such, its early years were plagued with architecture, security and performance issues, as well as many "gotchas" that could wreak havoc on amateur programmers that tended to gravitate to the language. Couple that with the fact that the maintainers drug their feet in implementing modern paradigms found in other languages and fixing the latter issues in the name of backwards compatibility, and that at the time most PHP knowledge bases were years out of date, and it was a recipe for a poor ecosystem all around.
PHP 7.0 took a huge step forward by straight up removing old extensions that weren't maintained, focused a lot on performance and allowing more strict standards, and tons of new improvements. In addition, more modern frameworks like Symfony and Laravel started to pop up, which helped reduce the stigma of it just being a "scripting" language and made it very pleasant to work with.
I maintain a PHP app that was originally written in PHP 4, and one that was created in PHP 7 and the difference is night and day. I maintain a few Ruby and Python apps as well, but even having used these more often PHP still tends to be my go to for prototyping.
- elcomet 8y agoThis sounds a lot like JavaScript
- 1_player 8y agoGotchas in Javascript are syntactic/semantic, because there's no standard library worth its name bundled with it. PHP's gotchas are syntactic/semantic but mostly on its huge standard library, which is an haphazard collection of functions from sending emails to parsing ID3 tags from MP3 files. EDIT: JS, as the legend says, was written in 10 days, while PHP grew without much long term vision for years.
- Technetium_Hat 8y agoI think the parent poster was talking about both being messy in the past, but recently having a major version upgrade that deprecated old features. PHP 7 could be compared to ES6 (as well as ES5's strict mode)