note 39981 deleted from tutorial.useful by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 17 Jul 2004 00:25:59 +0000 |
| Subject: | note 39981 deleted from tutorial.useful by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73425@lists.php.net to get a copy of this message | ||
Note Submitter: mark@txfx.net
----
Not only is it intuitive (does what you think it should), jumping out of PHP, rather than using an
echo, is apparently faster! Forget about escaping naughty characters ad nauseum, just escape that
PHP.
<?php
echo 'This isn\'t very easy, and a \'parse\' error isn\'t all that
uncommon.';
?>
This is MUCH easier. ''' """ """ ''' Eat
that, PHP!
<?php
echo 'I\'m sorry PHP, I didn\'t mean what I said.';
?>