top | item 41547361

(no title)

handelaar | 1 year ago

isset($var) will return false if you have deliberately set $var === NULL

Otherwise more or less fine?

The whole OP here is a longwinded way of observing that several built-in PHP functions don't know anything about types. You can't use switch() as it's usually documented either, for example, because that ignores types too.

There are ways around all these things, of course. PHP that doesn't suck is kind of the norm these days. Just stay the hell away from Wordpress

discuss

order

Cyberdog|1 year ago

How can WordPress be so prominent and have so much money behind it and still have such garbage code? Are there giant companies still running PHP 4 server farms that need it to continue to be coded to 2003 standards? Is it some government op to ensure a good deal of the sites on the web are easily-hackable? Someone explain this to me.

mklepaczewski|1 year ago

This should be a lesson for everyone. Code quality doesn't matter, language doesn't matter, it only matters if people want your product. If you would look at the code quality of the most successful WordPress plugins you would be... uh, amazed? Compared to them WordPress' code quality is top notch. Yet, they probably bring in million/month from subscriptions. If you're curious see WpAllImport

cynicalsecurity|1 year ago

I'm sorry, what code exactly did you find to be garbage?