Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Pad array to the specified length with a value
<?php array_pad(array $array, int $length, mixed $value): array
<?php         $uri = Str::removeLeft($uri, '/');



        [$taxonomy, $slug] = array_pad(explode('/', $uri), 2, null);



        if (! $slug) {

            return null;
<?php             return $key === 'taxonomy' || Str::startsWith($key, 'taxonomy:');

        })->each(function ($values, $param) use ($query) {

            $taxonomy = substr($param, 9);

            [$taxonomy, $modifier] = array_pad(explode(':', $taxonomy), 2, 'any');



            if (is_string($values)) {

                $values = array_filter(explode('|', $values));
<?php {

    public function validate($attribute, $value, $parameters, $validator)

    {

        [$collection, $except, $site] = array_pad($parameters, 3, null);



        $query = Entry::query();
<?php {

    public function validate($attribute, $value, $parameters, $validator)

    {

        [$taxonomy, $except, $site] = array_pad($parameters, 3, null);



        $query = Term::query();
<?php {

    public function validate($attribute, $value, $parameters, $validator)

    {

        [$except] = array_pad($parameters, 1, null);



        $existing = User::query()

            ->where($attribute, $value)