File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -4147,8 +4147,7 @@ PHP_FUNCTION(array_key_last)
4147
4147
/* {{{ Return just the values from the input array */
4148
4148
PHP_FUNCTION (array_values )
4149
4149
{
4150
- zval * input , /* Input array */
4151
- * entry ; /* An entry in the input array */
4150
+ zval * input ; /* Input array */
4152
4151
zend_array * arrval ;
4153
4152
zend_long arrlen ;
4154
4153
@@ -4170,20 +4169,7 @@ PHP_FUNCTION(array_values)
4170
4169
RETURN_COPY (input );
4171
4170
}
4172
4171
4173
- /* Initialize return array */
4174
- array_init_size (return_value , arrlen );
4175
- zend_hash_real_init_packed (Z_ARRVAL_P (return_value ));
4176
-
4177
- /* Go through input array and add values to the return array */
4178
- ZEND_HASH_FILL_PACKED (Z_ARRVAL_P (return_value )) {
4179
- ZEND_HASH_FOREACH_VAL (arrval , entry ) {
4180
- if (UNEXPECTED (Z_ISREF_P (entry ) && Z_REFCOUNT_P (entry ) == 1 )) {
4181
- entry = Z_REFVAL_P (entry );
4182
- }
4183
- Z_TRY_ADDREF_P (entry );
4184
- ZEND_HASH_FILL_ADD (entry );
4185
- } ZEND_HASH_FOREACH_END ();
4186
- } ZEND_HASH_FILL_END ();
4172
+ RETVAL_ARR (zend_array_to_list (arrval ));
4187
4173
}
4188
4174
/* }}} */
4189
4175
You can’t perform that action at this time.
0 commit comments