original_string: public static function arrayDiff($array1, $array2) {
          return array_udiff($array1, $array2,
              function ($a, $b) {
                  if (is_object($a)) {
                      return strcmp(spl_object_hash($a), spl_object_hash($b));
                  } else if (is_array($a)) {
                      return ArrayUtils::arrayDiff($a, $b);
                  } else {
                      return strcmp($a, $b);
                  }
              }
          );
      }
code: public static function arrayDiff($array1, $array2) {
          return array_udiff($array1, $array2,
              function ($a, $b) {
                  if (is_object($a)) {
                      return strcmp(spl_object_hash($a), spl_object_hash($b));
                  } else if (is_array($a)) {
                      return ArrayUtils::arrayDiff($a, $b);
                  } else {
                      return strcmp($a, $b);
                  }
              }
          );
      }
code_tokens: public static function arrayDiff ( $ array1 , $ array2 ) { return array_udiff ( $ array1 , $ array2 , function ( $ a , $ b ) { if ( is_object ( $ a ) ) { return strcmp ( spl_object_hash ( $ a ) , spl_object_hash ( $ b ) ) ; } else if ( is_array ( $ a ) ) { return ArrayUtils :: arrayDiff ( $ a , $ b ) ; } else { return strcmp ( $ a , $ b ) ; } } ) ; }
docstring: Diff function for arrays which works with arrays of objects as well as string comparables.
  
  @param $array1
  @param $array2
docstring_tokens: Diff function for arrays which works with arrays of objects as well as string comparables .