3 ms·
The more projects I work on, the less I like configurable language options. Some libraries are written assuming <? is fine, some aren't. But god help you when
by DanHulton 12y ago
The more projects I work on, the less I like configurable language options.
Some libraries are written assuming <? is fine, some aren't. But god help you when you try to merge them in.
As PHP has grown older, less of these strange incompatibilities continue to be supported (safe mode, etc), and I'm thankful for that.
- skrebbel 12y agoI'm not sure if this could be easily built into PHP, but per-directory options are supported by PHP (when on apache, via a .htaccess file). If you could turn on or off strong typing per directory (or, alternatively, per file much like JS's "use strict"), there wouldn't be much of a practical problem. It could even be a function modifier. Unlike static typing or const correctness or immutability, strong typing is a very local feature that doesn't "bubble" across your codebase once you start using it.
- ceejayoz 12y agoAllowing .htaccess comes with a performance hit (Apache has to scan the directory and all of its parents for a .htaccess file on every pageview) and should generally not be used unless strictly necessary.