mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
Removes special empty array.
This commit is contained in:
@@ -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);
|
||||
|
||||
4
types.go
4
types.go
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user