PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\BSON\Javascript::__construct
request it (617)
GoLang replacement for PHP's MongoDB\BSON\Javascript::__construct
[edit | history]
PHP MongoDB\BSON\Javascript::__constructPHP original manual for MongoDB\BSON\Javascript::__construct [ show | php.net ]MongoDB\BSON\Javascript::__construct(mongodb >=1.0.0) MongoDB\BSON\Javascript::__construct — Construct a new Javascript Description
final public MongoDB\BSON\Javascript::__construct
( string
$code
[, array|object $scope
] )Parameters
Errors/Exceptions
Changelog
ExamplesExample #1 MongoDB\BSON\Javascript::__construct() example
<?phpThe above example will output:
object(MongoDB\BSON\Javascript)#1 (2) {
["javascript"]=>
string(24) "function() { return 1; }"
["scope"]=>
object(stdClass)#2 (0) {
}
}
object(MongoDB\BSON\Javascript)#2 (2) {
["javascript"]=>
string(26) "function() { return foo; }"
["scope"]=>
object(stdClass)#1 (1) {
["foo"]=>
string(3) "bar"
}
}
See Also |
more
Most requested
more
Last requests
|