MongoCode::__toString

(PECL mongo >= 0.8.3)

MongoCode::__toStringReturns this code as a string

Açıklama

public MongoCode::__toString ( void ) : string

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

This code, the scope is not returned.

Örnekler

Örnek 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";

?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

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