Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [MongoCode

Protect Your Website Today


PHP Manual || MongoCode

(PECL mongo >= 0.8.3)

MongoCode::__toStringReturns this code as a string

Description

public MongoCode::__toString ( void ) : string

Parameters

This function has no parameters.

Return Values

This code, the scope is not returned.

Examples

Example #1 MongoCode::__toString() example

<?php

$code 
= new MongoCode('return x;', array("x"=>"hi"));
echo 
"$code\n";

$code = new MongoCode('function() { for(i=0;i<10;i++) { db.foo.update({x:i}, {x:i+1}); } }');
echo 
"$code\n";

?>

The above example will output something similar to:

return x;
function() { for(i=0;i<10;i++) { db.foo.update({x:i}, {x:i+1}); } }


PHP Manual || MongoCode