getTokens(); if (!array_key_exists('nested_parenthesis', $tokens[$variablePointer])) { return false; } $parenthesisOpenerPointer = array_reverse(array_keys($tokens[$variablePointer]['nested_parenthesis']))[0]; if (!array_key_exists('parenthesis_owner', $tokens[$parenthesisOpenerPointer])) { return false; } $parenthesisOwnerPointer = $tokens[$parenthesisOpenerPointer]['parenthesis_owner']; return in_array($tokens[$parenthesisOwnerPointer]['code'], TokenHelper::$functionTokenCodes, true); } }