array_search

Supported Versions: PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8
Searches the array for a given value and returns the first corresponding key if successful
<?php array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false
<?php     protected function injectBootstrapperBefore(string $before, string $inject, array $bootstrappers): array

    {

        $injectIndex = array_search($before, $bootstrappers, true);



        if ($injectIndex !== false) {

            array_splice($bootstrappers, $injectIndex, 0, [$inject]);