[TYPO3-core] preg_replace / back references

Dmitry Dulepov dmitry at typo3.org
Tue Jun 26 11:52:08 CEST 2007


Hi!

Ernesto Baschny [cron IT] wrote:
> Dmitry Dulepov wrote: on 26.06.2007 11:23:
>> I see no problem with ${1} because it is standard syntax but just
>> curious...
> 
> Probably because php documentation recommends using $n. From
> http://www.php.net/manual/en/function.preg-replace.php
> 
>     replacement may contain references of the form \\n or (since PHP
> 4.0.4) $n, with the latter form being the preferred one.
> 
> Probably they just copied the recommendation from perlre man page. See:
> 
> http://www.perl.com/doc/manual/html/pod/perlre.html#WARNING_on_1_vs_1

Hm. May be.

Anyway, patch gets my full +1 :)

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs


More information about the TYPO3-team-core mailing list