cvs: pear /PHP_Compat/Compat/Function array_uintersect_uassoc.php
| From: | Aidan Lister | Date: | Tue, 31 Aug 2004 11:16:39 +0000 |
| Subject: | cvs: pear /PHP_Compat/Compat/Function array_uintersect_uassoc.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23528@lists.php.net to get a copy of this message | ||
aidan Tue Aug 31 07:16:39 2004 EDT
Modified files:
/pear/PHP_Compat/Compat/Function array_uintersect_uassoc.php
Log:
"optimised" loop
http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php?r1=1.6&r2=1.7&ty=u
Index: pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php
diff -u pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php:1.6
pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php:1.7
--- pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php:1.6 Tue Aug 31 07:07:15 2004
+++ pear/PHP_Compat/Compat/Function/array_uintersect_uassoc.php Tue Aug 31 07:16:39 2004
@@ -15,7 +15,7 @@
// | Authors: Aidan Lister <aidan@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: array_uintersect_uassoc.php,v 1.6 2004/08/31 11:07:15 aidan Exp $
+// $Id: array_uintersect_uassoc.php,v 1.7 2004/08/31 11:16:39 aidan Exp $
/**
@@ -25,7 +25,7 @@
* @package PHP_Compat
* @link http://php.net/function.array_uintersect_uassoc
* @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @since PHP 5
* @require PHP 4.0.1 (trigger_error)
*/
@@ -71,7 +71,7 @@
// Compare entries
$output = array();
foreach ($args[0] as $key => $item) {
- for ($i = 1; $i !== $array_count; $i++) {
+ for ($i = 1; $i < $array_count; $i++) {
if (array_key_exists($key, $args[$i])) {
$compare = call_user_func($key_compare_func, $item, $args[$i][$key]);
if ($compare === 0) {