sizeof() is enough
This commit is contained in:
parent
f0b3adc44a
commit
d1e56b9206
|
@ -5482,7 +5482,6 @@ static int ph7_hashmap_walk_recursive(ph7_context *pCtx, int nArg, ph7_value **a
|
|||
* Table of hashmap functions.
|
||||
*/
|
||||
static const ph7_builtin_func aHashmapFunc[] = {
|
||||
{"count", ph7_hashmap_count },
|
||||
{"sizeof", ph7_hashmap_count },
|
||||
{"array_key_exists", ph7_hashmap_key_exists },
|
||||
{"array_pop", ph7_hashmap_pop },
|
||||
|
|
2
vm.c
2
vm.c
|
@ -1106,7 +1106,7 @@ static sxi32 VmEvalChunk(ph7_vm *pVm, ph7_context *pCtx, SyString *pChunk, int i
|
|||
"function array_merge_recursive($array1, $array2){"\
|
||||
"if( func_num_args() < 1 ){ return NULL; }"\
|
||||
"$arrays = func_get_args();"\
|
||||
"$narrays = count($arrays);"\
|
||||
"$narrays = sizeof($arrays);"\
|
||||
"$ret = $arrays[0];"\
|
||||
"for ($i = 1; $i < $narrays; $i++) {"\
|
||||
" if( array_same($ret,$arrays[$i]) ){ /* Same instance */continue;}"\
|
||||
|
|
Loading…
Reference in New Issue