MongoDB\BSON\Regex::getFlags
PHP function
Edit on GitHub ✎
(mongodb >=1.0.0)
Returns the Regex's flags
Description
MongoDB\BSON\Regex::getFlags(): string
Parameters Parameters
Return Values
Returns the Regex's flags.
Errors/Exceptions
Examples
MongoDB\BSON\Regex::getFlags() example
php
<?php
$regex = new MongoDB\BSON\Regex('regex', 'i');
var_dump($regex->getFlags());
?>The above example will output something similar to:
output
string(1) "i"See Also
- BSON Types
- Supported regular expression flags