MongoDB\BSON\Javascript::__toString
(mongodb >=1.2.0)
MongoDB\BSON\Javascript::__toString — Returns the Javascript's code
说明
此方法是该方法的别名: MongoDB\BSON\Javascript::getCode().
参数
此函数没有参数。
返回值
Returns the Javascript's code.
示例
示例 #1 MongoDB\BSON\Javascript::__toString() example
<?php
var_dump((string) new MongoDB\BSON\Javascript('function foo(bar) { return bar; }'));
?>
以上示例会输出:
string(33) "function foo(bar) { return bar; }"
参见
- MongoDB\BSON\Javascript::getCode() - Returns the Javascript's code
- » BSON Types
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/mongodb-bson-javascript.tostring.php