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

Michael M Slusarz slusarz at horde.org
Wed Nov 18 23:52:57 UTC 2009


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::.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list