array_key_last

Supported Versions: PHP 7 >= 7.3.0, PHP 8
Gets the last key of an array
<?php array_key_last(array $array): int|string|null
<?php                 '\{first}' => '{first}',

                '{first}' => array_key_first(is_array($target) ? $target : collect($target)->all()),

                '\{last}' => '{last}',

                '{last}' => array_key_last(is_array($target) ? $target : collect($target)->all()),

                default => $segment,

            };
<?php                 $this->oneOfManySubQuery = $subQuery;

            }



            if (array_key_last($columns) == $column) {

                $this->addOneOfManyJoinSubQuery(

                    $this->query,

                    $subQuery,
<?php         $output = (string) $this->dump($data, true);

        $lines = explode("\n", $output);



        $lines[array_key_last($lines) - 1] .= $this->getDumpSourceContent();



        $this->output->write(implode("\n", $lines));
<?php                                                                     $line .

                                                                    strings(self::$space)->repeat($pr)) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.
<?php                                                                     $line .

                                                                    strings(self::$space)->repeat($pr)) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.
<?php                                         ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.left')) : '') .

                                        $applyTextAndBackgroundColor($currentLine) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.
<?php                                                                     strings(self::$space)->repeat($prCurrent)) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        strings(self::$space)->repeat($mr) .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.
<?php                                                                     strings(self::$space)->repeat($pr)) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        strings(self::$space)->repeat($mr) .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.
<?php                                         $applyTextAndBackgroundColor($currentLine) .

                                        ($hasBorder() ? $applyBorderColor(self::$theme->getVariables()->get('borders.' . $borderStyle . '.right')) : '') .

                                        strings(self::$space)->repeat($mr) .

                                        ($key === array_key_last($lines) ? '' : PHP_EOL);

                    }



                    return // Set box border top style.