On Wed, April 18, 2007 5:33 pm, Yvan Strahm wrote:
> I have this function:
>
> function preg_array($pattern, $array, $r_array)
>   {
>     global $match;
>     global $r_array;

Passing in $r_array *AND* declaring it global is just plain silly.

Do one or the other, but not both.

If the array is LARGE, you may also want to consider writing this with
array_map and a create_function so that you can have the iteration
happening in C instead of in PHP...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to