[dev] [commits] Horde branch master updated. a8c37cecc10670f9db7e095db58ea78cec3845f1

Jan Schneider jan at horde.org
Thu Nov 19 00:34:48 UTC 2009


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> commit a8c37cecc10670f9db7e095db58ea78cec3845f1
>> Author: Jan Schneider <jan at horde.org>
>> Date:   Thu Nov 19 00:43:15 2009 +0100
>>
>>    Add strftime2date().
>>
>> framework/Date/lib/Horde/Date/Utils.php |   94  
>> +++++++++++++++++++++++++++++++
>> 1 files changed, 94 insertions(+), 0 deletions(-)
>>
>> http://git.horde.org/diff.php/framework/Date/lib/Horde/Date/Utils.php?rt=horde-git&r1=71a04e9c16a00b60846b7d554924e480bcc621a3&r2=a8c37cecc10670f9db7e095db58ea78cec3845f1
>
> I personally find it easier to read (and maintain) to do the following:
>
> $foo = array(
>     '/search1/' => 'replace1',
>     '/search2/' => 'replace2',
>     ...
> );
> preg_replace(array_keys($foo), array_values($foo), $text);
>
> See, e.g., Horde_Mime_Viewer_Enriched::.

True, thanks for the hint.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list