note 91015 deleted from function.json-decode by danbrown

From: Date: Thu, 21 May 2009 12:51:30 +0000
Subject: note 91015 deleted from function.json-decode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155838@lists.php.net to get a copy of this message
Note Submitter: soletan at toxa dot de ---- @Gravis: using substr( $str, 1, -1 ) is a bit easier to read. In addition your preg_replace() might fail on strings (as values in $str) containing colon as a literal a better parser would properly recognize, e.g. ({title:"Yellow Pages: Who do you want to call today?"}) Aside from that preg_replace() supports "\w" which might reduce your pattern.

« previous php.notes (#155838) next »