(PECL mongo >= 0.8.3)
MongoCode::__toString — 锟斤拷锟截达拷锟斤拷锟斤拷址锟斤拷锟斤拷锟绞�
This extension that defines this method is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this method in the new extension.
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟矫达拷锟诫,锟斤拷锟结返锟斤拷锟斤拷锟斤拷锟斤拷
Example #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}); } }