sizeof() is enough

This commit is contained in:
Rafal Kupiec 2018-07-19 16:52:39 +02:00
parent f0b3adc44a
commit d1e56b9206
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 1 additions and 2 deletions

View File

@ -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
View File

@ -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;}"\