Finds a pattern in a block of code.
public static find ( string $code, string $pattern, array $options = [] ) : array | ||
$code | string | |
$pattern | string | |
$options | array | The list of options to be used when parsing / matching `$code`: - 'ignore': An array of token names to ignore while parsing, defaults to `array('T_WHITESPACE')` - 'lineBreaks': If true, all tokens in a single pattern match must appear on the same line of code, defaults to false - 'startOfLine': If true, the pattern must match starting with the beginning of the line of code to be matched, defaults to false |
return | array |