8 ms·
PHP5.4 also has the short syntax array initializer: $array = [1, 2, 3]; Edit: While PHP still has it's fair share of issues, a lot of the same complaints
by leftnode 15y ago
PHP5.4 also has the short syntax array initializer:
$array = [1, 2, 3];
Edit: While PHP still has it's fair share of issues, a lot of the same complaints people had 5-8 years ago aren't valid, and it probably has no more or less oddities than any other scripting language at this point.
- jacques_chester 15y agoThe problem with PHP is that 99.99% of the code in circulation today isn't the shinier cleaned-up versions. It's PHP4 and PHP 5.0 and it's still chock-a-block with the storied mind-bending nastiness of yore.
- gregbair 15y agonot true at all. Maybe if you're looking at old sites, but PHP5's been out for a long time now, and most of the code in circulation is made for 5.2 or higher. No serious MVC framework, for instance, will run on anything less than 5.2.
- jacques_chester 15y agoSerious MVC frameworks are not the backbone of Wordpress, phpBB or dozens of other hairy monsters that make up the majority of CPU time spent on PHP execution. I mean Wordpress flat out resisted PHP 5.0 for years. Years. Everything had to be done in PHP4.
- jmathai 15y ago> I mean Wordpress flat out resisted PHP 5.0 for years. Years. Everything had to be done in PHP4. I presume that's because of the size of Wordpress' install base. The number of people who run their software on $9/month shared hosting environments is staggering. Many of those are late to upgrade PHP versions. Wordpress gets a lot of crap for being poorly written but the truth is that it's an example of software that works really well given some really unique circumstances. If the WP devs decided that their software didn't need to support the 99% of web servers out there then it wouldn't be nearly as ubiquitous as it is today.
- jacques_chester 15y agoWordpress gets a lot of crap for being poorly written because it is poorly written. There's no great mystery here. Yes, they deal with lots of different configurations. This is not unique in the history of software development. It's called "portability" and many organisations seem to be able to achieve it without compromising quality. My searing, eye-boiling hatred for Wordpress comes from administering it for what is now nearly a decade. Every time I dive into the code I am frequently repulsed by it. The total absence of tests is my favourite "feature". I've seen multiple bugs closed with WORKSFORME that I was directly grappling with.
- robryan 15y agoYou are right it is far from perfect, it is pragmatic and providing a great amount of value for people/ businesses. It is surprising to me that we haven't seen a big challenger trying to do it right from a back end perspective.
- jacques_chester 15y agoBecause users don't care about the backend. They care about the shiny features, look-and-feel and the availability of plugins and themes. Wordpress delivers these in spades.
- jmathai 15y agoYou probably have more experience with Wordpress than I do so I won't try to argue with that :).
- mark_up 15y agoThe latest Joomla Platform requires PHP 5.3, includes tests, and is actually a half-decent MVC framework. https://github.com/joomla/joomla-platform https://github.com/joomla/joomla-platform
- notJim 15y agoIt really depends on what types of place you're working at. In the past 6 years or so, I've worked on a lot of PHP, and nearly all of it was pretty high-quality, because I don't like working at companies that don't care about code. My point is, if you have the luxury of the same filter in your job choices, PHP isn't necessarily the big red flag it could be. The only exceptions for me have been when I've had to deal with someone else's codebase, or with Wordpress (and Django once), but again, I wouldn't personally take a job where those were the main responsibilities.