note 91894 added to migration53.deprecated
| From: | Chris at PureFormSolutions dot com | Date: | Tue, 30 Jun 2009 23:57:22 +0000 |
| Subject: | note 91894 added to migration53.deprecated | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157736@lists.php.net to get a copy of this message | ||
To find [and replace] string access offsets using {}, like:
<?php
$var = "abcd";
echo $var{1};
?>
I plugged this regex into my IDE [NuSphere]:
\$([a-zA-Z0-9_]+){([^}]+)}
... and put this as the replacement string:
$\1[\2]
This helped me find all the instances of this in my code, but it might not find all of them in
yours. It will ignore stuff like:
<?php
$var_1 = "abcd";
$i = 1;
echo ${'var_' . $i}{1}; # this will not be found by the regex above
?>
----
Server IP: 64.71.164.2
Probable Submitter: 24.21.86.44
----
Manual Page -- http://www.php.net/manual/en/migration53.deprecated.php
Edit -- https://master.php.net/note/edit/91894
Del: integrated -- https://master.php.net/note/delete/91894/integrated
Del: useless -- https://master.php.net/note/delete/91894/useless
Del: bad code -- https://master.php.net/note/delete/91894/bad+code
Del: spam -- https://master.php.net/note/delete/91894/spam
Del: non-english -- https://master.php.net/note/delete/91894/non-english
Del: in docs -- https://master.php.net/note/delete/91894/in+docs
Del: other reasons-- https://master.php.net/note/delete/91894
Reject -- https://master.php.net/note/reject/91894
Search -- https://master.php.net/manage/user-notes.php