array_splice
laravel/octane
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Remove a portion of the array and replace it with something else
array_splice
(
array
&
$array
,
int $offset
,
?
int $length
=
null
,
mixed $replacement
= []): array
$injectIndex
=
array_search
(
$before
,
$bootstrappers
,
true
);
if (
$injectIndex
!==
false
) {
array_splice
(
$bootstrappers
,
$injectIndex
,
0
, [
$inject
]);
}
return
$bootstrappers
;
src/ApplicationFactory.php