downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoDate> <MongoCode::__construct
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoCode::__toString

(PECL mongo >= 0.8.3)

MongoCode::__toStringこのコードを文字列で返す

説明

public string MongoCode::__toString ( void )

パラメータ

この関数にはパラメータはありません。

返り値

このコードを返します。スコープは返しません。

例1 MongoCode::__toString() の例

<?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";

?>

上の例の出力は、 たとえば以下のようになります。

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


add a note add a note User Contributed Notes MongoCode::__toString
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites