Doctrine\DBAL\SQLParserUtils::getPlaceholderPositions
Get an array of the placeholders in an sql statements as keys and their positions in the query string.
Returns an integer => integer pair (indexed from zero) for a positional statement and a string => int[] pair for a named statement.
Signature
public function getPlaceholderPositions(string
$statement,
[bool
$isPositional = true] )
Parameters
$statement
— string$isPositional
— object
Returns
- array