MongoCode::__toString

(PECL mongo >= 0.8.3)

MongoCode::__toStringReturns this code as a string

설명

public string MongoCode::__toString ( void )

인수

이 함수는 인수가 없습니다.

반환값

This code, the scope is not returned.

예제

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

?>

위 예제의 출력 예시:

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

There are no user contributed notes for this page.
To Top