5 ms·
The htmlentities issue isn't anything a little upstream logic couldn't fix; just the same as Django's templating engine does. <?= $name ?> is my preferred meth
by tcdent 16y ago
The htmlentities issue isn't anything a little upstream logic couldn't fix; just the same as Django's templating engine does.
<?= $name ?> is my preferred method of printing inline, which shortens it up quite a bit.
- rix0r 16y agoMine, too, although I usually do my escaping/encoding in the template itself, so it becomes: <?= h($name) ?> Which isn't that terrible. The PHP developers don't make this easy though, as "short tags" are officially recommended to be disabled, so to write portable PHP you'd have to do <?php= h($name) ?> Every time, which adds visual noise that gets worse the more tags you write.