On Wed, Sep 11, 2002 at 06:13:48PM -0000, Andrey Hristov wrote: > andrey Wed Sep 11 14:13:48 2002 EDT > > Modified files: > /php4/ext/standard array.c basic_functions.c php_array.h > Log: > New function added : array_diff_assoc() . Like array_diff() but does > additional checks on key values. Test script will be added too.
[snip] > +PHP_FUNCTION(array_diff) > +{ > + php_array_diff(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0 TSRMLS_CC); > +} [snip] > +PHP_FUNCTION(array_diff_assoc) > +{ > + php_array_diff(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1 TSRMLS_CC); > +} Looks good overall, but I would suggest using #define'd values for the 'behavior' parameter instead of explicitly passing 0 and 1 as magic numbers. e.g.: #define DIFF_NORMAL 0 #define DIFF_ASSOC 1 php_array_diff(INTERNAL_FUNCTION_PARAM_PASSTHRU, DIFF_ASSOC TSRMLS_CC); You get the idea. =) -- Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/) -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php