4 ms·
There is nothing to see here, go away please. :) It's just the simplest way of turning a code fragment on/off. Not pretty, but not the end of the world either.
by sz4kerto 13y ago
There is nothing to see here, go away please. :) It's just the simplest way of turning a code fragment on/off. Not pretty, but not the end of the world either. :)
- nailer 13y agoSure (if the code shouldn't just be deleted at all and kept in version control), but I'd rather shove the magic constant and it's explanation into a variable at the top of the file: // PHP has a bug that prevents you from creating a byte array via variants PHP_BUG_123_RESOLVED = false;
- xroche 13y agoIn C, at least, compared to the commented out version or removed (when using versionning) variant, the code is still present and builds (and will break upon API change, guaranteeing it to be up-to-date), is present when re-factoring (not necessarily easy with all version control systems), and has no impact over performances (might not be true with PHP). So this can be seen as a feature, actually.
- dz0ny 13y agoPHP will parse whole file, before actually optimizing anything. Thats the only penalty you get.