We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60252b7 commit 309e66dCopy full SHA for 309e66d
ext/standard/hrtime.c
@@ -58,10 +58,10 @@ PHP_FUNCTION(hrtime)
58
if (UNEXPECTED(get_as_num)) {
59
PHP_RETURN_HRTIME(t);
60
} else {
61
- array_init_size(return_value, 2);
62
- zend_hash_real_init_packed(Z_ARRVAL_P(return_value));
63
- add_next_index_long(return_value, (zend_long)(t / (zend_hrtime_t)ZEND_NANO_IN_SEC));
64
- add_next_index_long(return_value, (zend_long)(t % (zend_hrtime_t)ZEND_NANO_IN_SEC));
+ zval first, second;
+ ZVAL_LONG(&first, (zend_long)(t / (zend_hrtime_t)ZEND_NANO_IN_SEC));
+ ZVAL_LONG(&second, (zend_long)(t % (zend_hrtime_t)ZEND_NANO_IN_SEC));
+ RETURN_ARR(zend_new_pair(&first, &second));
65
}
66
#else
67
RETURN_FALSE;
0 commit comments