Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Constants.php

function Constants::getDoubleQuotedVarRegexp

* A regexp for matching variable names in double-quoted strings. * *

Return value

string

2 calls to Constants::getDoubleQuotedVarRegexp()
Helpers::getVariablesInsideCompact in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
* Return the variable names and positions of each variable targetted by a `compact()` call. * *
VariableAnalysisSniff::processVariableInString in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php
* Called to process variables found in double quoted strings. * * Note that there may be more than one variable in the string, which will * result only in one call for the string. * *

File

vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Constants.php, line 256

Class

Constants

Namespace

VariableAnalysis\Lib

Code

public static function getDoubleQuotedVarRegexp() {
    return '|(?<!\\\\)(?:\\\\{2})*\\${?([a-zA-Z0-9_]+)}?|';
}
RSS feed
Powered by Drupal