MongoCode::__construct
MongoDate
MongoCode
PHP Manual

# MongoCode::__toString

(PECL mongo >= 0.8.3)

MongoCode::__toString — Returns this code as a string

### Descrição

public string MongoCode::__toString ( void )

### Parâmetros

Esta função não possui parâmetros.

### Valor Retornado

This code, the scope is not returned.

### Exemplos

Exemplo #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";
?>`

O exemplo acima irá imprimir algo similar à:

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

MongoCode::__construct
MongoDate
MongoCode
PHP Manual