Thread Closed  Post Thread 

Escaping PHP
Author Message
chaneguye
Member



Posts: 125
Group: Registered
   
Cash: 0.00 Donate
Escaping PHP

Are there any drawbacks from escaping PHP? I swear I read somewhere (possibly on HTMLForums) that constantly escaping PHP would negatively effect execution time. So over the past few months I have been trying to escape PHP to output HTML as little as possible. There are some obvious cases where I use a ton of HTML with no need for PHP so I escape PHP. But this has led to my code being ugly with a ton of echo's and escaped quotes. And then when I view source on my HTML to see how that looks it is all screwed with little to no tabbing to differentiate levels.

Does anyone have any knowledge on this?


Rosetta Stone Chinese
Rosetta Stone Arabic
11-08-2011 07:07 PM
Send the author a private message Visit authors website Find all posts by this author Quote this message in a reply
Affiliate Banner
This is an ad revenue sharing forum
freeplusac
Junior Member



Posts: 9
Group: Registered
   
Cash: 0.00 Donate
RE:  Escaping PHP

It is a technique to prevent PHP from ending your strings too early, or for making sure you have the correct string information returned.

<?PHP

$string = 'John's Car';
print $string;

?>


free accounts software | online accounting software
11-08-2011 07:54 PM
Send the author a private message Find all posts by this author Quote this message in a reply

Thread Closed  Post Thread 


View a Printable Version | Send this Thread to a Friend | Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:
Forum Jump: