TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
461 B
27 lines
461 B
--TEST--
|
|
substr_replace() function - array with unset
|
|
--FILE--
|
|
<?php
|
|
|
|
$replacement = ['A', 'C', 'B'];
|
|
unset($replacement[1]);
|
|
$newarr = substr_replace(['1 string', '2 string'], $replacement, 0);
|
|
print_r($newarr);
|
|
|
|
$replacement = ['foo', 42 => 'bar', 'baz'];
|
|
unset($replacement[42]);
|
|
$newarr = substr_replace(['1 string', '2 string'], $replacement, 0);
|
|
print_r($newarr);
|
|
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
[0] => A
|
|
[1] => B
|
|
)
|
|
Array
|
|
(
|
|
[0] => foo
|
|
[1] => baz
|
|
)
|
|
|