Andi Gutmans wrote:
I suggest to make those #define's bit flags and then change:
} else if (behavior == INTERSECT_ASSOC || behavior == INTERSECT_KEY)
to
(behavior & (INTERSECT|INTERSECT_KEY))
This idea came to my mind too. I have already commited a working version without
bitflags but in the next d
Cristiano Duarte wrote:
Andrey Hristov wrote:
Hallo Cristiano,
these 2 function will be added to HEAD in few minutes. I see that the
patch is kind of trivial and won't hurt anything :) (INTERSECT_KEY
is just INTERSECT_ASSOC but no data comparison performed).
I will add also array_diff_key() and a
I suggest to make those #define's bit flags and then change:
} else if (behavior == INTERSECT_ASSOC || behavior == INTERSECT_KEY)
to
(behavior & (INTERSECT|INTERSECT_KEY))
Change:
#define INTERSECT_NORMAL 0
#define INTERSECT_ASSOC1
+#define INTERSECT_KEY
Well, i think I have found a buggie (not related to these functions and I want to
investigate it). Thus I will delay the commit.
Cristiano Duarte wrote:
Andrey Hristov wrote:
Hallo Cristiano,
these 2 function will be added to HEAD in few minutes. I see that the
patch is kind of trivial and won't
Andrey Hristov wrote:
> Hallo Cristiano,
> these 2 function will be added to HEAD in few minutes. I see that the
> patch is kind of trivial and won't hurt anything :) (INTERSECT_KEY
> is just INTERSECT_ASSOC but no data comparison performed).
> I will add also array_diff_key() and array_diff_uke
Andrey Hristov wrote:
> Hallo Cristiano,
> these 2 function will be added to HEAD in few minutes. I see that the
> patch is kind of trivial and won't hurt anything :) (INTERSECT_KEY
> is just INTERSECT_ASSOC but no data comparison performed).
> I will add also array_diff_key() and array_diff_uke
Hallo Cristiano,
these 2 function will be added to HEAD in few minutes. I see that the
patch is kind of trivial and won't hurt anything :) (INTERSECT_KEY
is just INTERSECT_ASSOC but no data comparison performed).
I will add also array_diff_key() and array_diff_ukey()
cheers,
andrey
P.S.
Andi: I th
Andrey Hristov wrote:
> is "make test" showing problems? (i am just currious).
> I will try to review the patch later today (atm i am sick).
Nope. Make test shows the same errors before and after the patch.
I decided to attach the patch since it will keep tabs...
Cristiano Duarte
--- array.c 200
Andrey Hristov wrote:
is "make test" showing problems? (i am just currious).
I will try to review the patch later today (atm i am sick).
Which also reminds me that we still dont have a function to merge a
multi dimensional array without messing with the array structures (which
array_merge_recursi
is "make test" showing problems? (i am just currious).
I will try to review the patch later today (atm i am sick).
andrey
Cristiano Duarte wrote:
Hi all,
I needed to intersect an array with database records indexed by the primary
key, with an array with keys and there is no php function that will d
Hello Cristiano,
First, I'd like to say that a function of this type sounds useful.
It's one that I've wanted for some time, particularly for verifying
that an array has the correct keys when it is passed as a function
parameter.
If I understand what you are doing correctly, the same
11 matches
Mail list logo