Removes special empty array.

This commit is contained in:
Alliballibaba
2025-12-23 22:48:12 +01:00
parent fcc9f81986
commit ff8f864a3d
2 changed files with 1 additions and 5 deletions

View File

@@ -752,7 +752,7 @@ if ($result !== ['HELLO', 'WORLD']) {
exit(1);
}
echo "Testing my_array_map with trim function\n";
echo "Testing my_array_map with empty array\n";
$result = my_array_map([], function($x) { return $x; });
if ($result !== []) {
echo "FAIL: my_array_map with empty array expected [], got " . json_encode($result);

View File

@@ -468,10 +468,6 @@ func phpValue(zval *C.zval, value any) {
// createNewArray creates a new zend_array with the specified size.
func createNewArray(size int) *C.zend_array {
if size == 0 {
// use the global empty array instance
return (*C.zend_array)(&C.zend_empty_array)
}
return C.__zend_new_array__(C.uint32_t(size))
}