- Standard:
. Fixed unzserialize(), to disable creation of unsupported data structures
through manually crafted strings. (Dmitry)
+ . Short circuit case where array_slice() would return its original array.
+ (Sara, Benjamin Coutu)
- Zlib:
. Added zlib/level context option for compress.zlib wrapper. (Sara)
return;
}
+ if ((offset == 0) && (length >= num_in) &&
+ HT_IS_PACKED(Z_ARRVAL_P(input)) &&
+ HT_IS_WITHOUT_HOLES(Z_ARRVAL_P(input))) {
+ /* No real slicing, and the keys will be 0..n-1, so just copy */
+ ZVAL_COPY(return_value, input);
+ return;
+ }
+
/* Initialize returned array */
array_init_size(return_value, (uint32_t)length);