Skip to content

Commit 957a0f6

Browse files
brainexeGirgias
authored andcommitted
in_array() avoid internal property access as we have the arrlen already
Closes GH-5662
1 parent 1622d22 commit 957a0f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4024,7 +4024,7 @@ PHP_FUNCTION(array_values)
40244024
}
40254025

40264026
/* Initialize return array */
4027-
array_init_size(return_value, zend_hash_num_elements(arrval));
4027+
array_init_size(return_value, arrlen);
40284028
zend_hash_real_init_packed(Z_ARRVAL_P(return_value));
40294029

40304030
/* Go through input array and add values to the return array */

0 commit comments

Comments
 (0)