Find a sequence of meaningful tokens and returns the array of their locations.
public findSequence ( array $sequence, integer $start, integer $end = null, boolean | array $caseSensitive = true ) : array | null | ||
$sequence | array | an array of tokens (same format used by getNextTokenOfKind) |
$start | integer | start index, defaulting to the start of the file |
$end | integer | end index, defaulting to the end of the file |
$caseSensitive | boolean | array | global case sensitiveness or an array of booleans, whose keys should match the ones used in $others. If any is missing, the default case-sensitive comparison is used |
return | array | null | an array containing the tokens matching the sequence elements, indexed by their position |