note 82009 deleted from language.types.string by danbrown

From: Date: Tue, 17 May 2011 14:16:31 +0000
Subject: note 82009 deleted from language.types.string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179806@lists.php.net to get a copy of this message
Note Submitter: chris at chrisstockton dot org ---- For anyone who reads Evan K, please note that: // a string to test, and show the before and after $before = 'Quantity:\t500\nPrice:\t$5.25 each'; $after = expand_escape($before); var_dump($before, $after); Is identical to (note all I added was a backslash before $): $before = "Quantity:\t500\nPrice:\t\$5.25 each"; var_dump($before); So its definitely better to escape a dollar instead of all the overhead of his regex and evals and such, although clever completely unnecessary. -Chris

« previous php.notes (#179806) next »