Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Fetch a key from an array
<?php key(array|object $array): int|string|null
<?php                     continue;

                }



                $conditionToken = \key($targetCondition);

                if ($conditionToken === $stackPtr) {

                    $phpcsFile->addWarning(

                        "Targeting a 'switch' control structure with a 'continue' statement is strongly discouraged and will throw a warning as of PHP 7.3.",
<?php                 if (empty($tokens[$j]['nested_parenthesis']) === false) {

                    $parentheses = $tokens[$j]['nested_parenthesis'];

                    end($parentheses);

                    $openParens   = key($parentheses);

                    $prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($openParens - 1), null, true);

                    if ($prevNonEmpty !== false

                        && $tokens[$prevNonEmpty]['code'] === \T_UNSET
<?php         ) {

            $throwError = true;

        } else {

            $opener       = \key($tokens[$stackPtr]['nested_parenthesis']);

            $prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), null, true);

            if ($tokens[$prevNonEmpty]['code'] !== \T_STRING) {

                return;
<?php         }



        $parenthesisCloser = \end($tokens[$stackPtr]['nested_parenthesis']);

        $parenthesisOpener = \key($tokens[$stackPtr]['nested_parenthesis']);



        if (isset($tokens[$parenthesisOpener]['parenthesis_owner']) === true) {