Richard Heyes wrote:
> Anyone interested in this patch?
>
>
not really, i'd use foreach and unset on the array before
extracting, far less obfuscated than the callback approach
or, if the array should not be modifiert:
function callback(&$value, $key) {
if(preg_match('/^var/', $key)) {
> To: PHP Dev
> Subject: [PHP-DEV] Patch to extract()
>
>
> I've added an extra option extract() to have potential variable
> names passed
> to a user defined callback function. If this function then returns true,
> it's extracted, if not it's no
I've added an extra option extract() to have potential variable names passed
to a user defined callback function. If this function then returns true,
it's extracted, if not it's not.
Anyone care to apply/check it?
Eg.:
', $var_1);
printf('var_2: %s ', $var_2);
printf('blaat: %s ', $blaat);
?>