5 ms·
I always thought it was weird and kind of stupid, but I'm genuinely curious how is that great thing. How is it weird and stupid? <?php echo $var ?> is better
by there 15y ago
I always thought it was weird and kind of stupid, but I'm genuinely curious how is that great thing.
How is it weird and stupid? <?php echo $var ?> is better than <?= $var ?> ?
- prodigal_erik 15y agoGood tools complain about <?= because it does not start with a named target. A lot of people just haven't read about the idea behind processing instruction syntax, which is also why we keep seeing mistakes like <%.
- danellis 15y agoA PHP script isn't an XML document, so processing instructions aren't really relevant. Even if your script is outputting XML, the script itself isn't going to be read by an XML parser.
- prodigal_erik 15y agoIt can if you want. It's not that hard to make documents which are valid before and after scripts run. This enables many more tools to work with them.