MongoDB\BSON\Javascript::__toString

(mongodb >=1.2.0)

MongoDB\BSON\Javascript::__toStringRetourne le code Javascript

Description

final public MongoDB\BSON\Javascript::__toString(): string

Cette méthode est un alias de: MongoDB\BSON\Javascript::getCode().

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne le code Javascript.

Exemples

Exemple #1 Exemple avec MongoDB\BSON\Javascript::__toString()

<?php

var_dump
((string) new MongoDB\BSON\Javascript('function foo(bar) { return bar; }'));

?>

L'exemple ci-dessus va afficher :

string(33) "function foo(bar) { return bar; }"

Voir aussi

add a note

User Contributed Notes

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant