src/Util/Arrays.php
public static function insertAfter(array &$arr, $key, array $inserted): void
    {
        $offset = self::searchKey($arr, $key);
        if ($offset === null) {
            $arr += $inserted;
        } else {
            ++$offset;
            $arr = \array_slice($arr, 0, $offset, true) + $inserted + \array_slice($arr, $offset, null, true);
        }
    }
public static function insertAfter(array &$arr, $key, array $inserted): void
    {
        $offset = self::searchKey($arr, $key);
        if ($offset === null) {
            $arr += $inserted;
        } else {
            ++$offset;
            $arr = \array_slice($arr, 0, $offset, true) + $inserted + \array_slice($arr, $offset, null, true);
        }
    }
public static function insertAfter ( array & $ arr , $ key , array $ inserted ) : void { $ offset = self :: searchKey ( $ arr , $ key ) ; if ( $ offset === null ) { $ arr += $ inserted ; } else { ++ $ offset ; $ arr = \ array_slice ( $ arr , 0 , $ offset , true ) + $ inserted + \ array_slice ( $ arr , $ offset , null , true ) ; } }
Inserts new array after item specified by key.

@param array      $arr
@param int|string $key
@param array      $inserted
Inserts new array after item specified by key .