}
/* }}} */
-/* {{{ proto array|null array_splice(array input, int offset [, int length [, array replacement]])
+/* {{{ proto array array_splice(array input, int offset [, int length [, array replacement]])
Removes the elements designated by offset and length and replace them with supplied array */
PHP_FUNCTION(array_splice)
{
/* Initialize return value */
array_init_size(return_value, size > 0 ? (uint32_t)size : 0);
rem_hash = Z_ARRVAL_P(return_value);
+ } else {
+ /* The return value will not be used, but make sure it still has the correct type. */
+ RETVAL_EMPTY_ARRAY();
}
/* Perform splice */
ZEND_ARG_VARIADIC_INFO(0, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_splice, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_splice, 0, 2, IS_ARRAY, 0)
ZEND_ARG_INFO(1, arg) /* ARRAY_INFO(1, arg, 0) */
ZEND_ARG_INFO(0, offset)
ZEND_ARG_INFO(0, length)