Anyone interested in this patch? -- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams
> -----Original Message----- > From: Richard Heyes [mailto:[EMAIL PROTECTED]] > Sent: 25 February 2002 16:18 > 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 not. > > Anyone care to apply/check it? > > Eg.: > > <?php > function extract_callback($varname){ > return preg_match('/^var/', $varname); > } > > $var['var_1'] = 1; > $var['var_2'] = 1; > $var['blaat'] = 1; > > extract($var, EXTR_USER_CALLBACK, 'extract_callback'); > > printf('var_1: %s <br>', $var_1); > printf('var_2: %s <br>', $var_2); > printf('blaat: %s <br>', $blaat); > ?> > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php