MongoDB\BSON\Regex::__toString

(mongodb >=1.0.0)

MongoDB\BSON\Regex::__toStringReturns the string representation of this Regex

說明

final public MongoDB\BSON\Regex::__toString(): string

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

Returns the string representation of this Regex.

范例

示例 #1 MongoDB\BSON\Regex::__toString() example

<?php

$regex 
= new MongoDB\BSON\Regex('regex''i');
var_dump((string) $regex);

?>

以上例程會(huì)輸出:

string(8) "/regex/i"

參見