Re: AW: AW: [PHP-DEV] dropping curly braces
| From: | George Schlossnagle | Date: | Sun, 20 Nov 2005 23:18:09 +0000 |
| Subject: | Re: AW: AW: [PHP-DEV] dropping curly braces | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20211@lists.php.net to get a copy of this message | ||
Ian P. Christian wrote:
On Sunday 20 November 2005 22:27, Ian P. Christian wrote:$$moo{1}; or $moo = array( 1 => 'foo'); $moo{1};If this change included a simple sed command that could be applied to code to fix 'legacy' codeSorry, should have included this... For example: $ cat test <?php $moo{3}; $foo = $moo{12}; ?> $ sed -e 's/$\([a-zA-Z][a-zA-Z0-9]*\){\([0-9]*\)}/substr($\1,\2,1)/g' test <?php substr($moo,3,1); $foo = substr($moo,12,1); ?> Doesn't work to well with