diff options
Diffstat (limited to 'documentation/variables.html')
-rw-r--r-- | documentation/variables.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/documentation/variables.html b/documentation/variables.html index 8c8b328..d577699 100644 --- a/documentation/variables.html +++ b/documentation/variables.html @@ -101,7 +101,7 @@ void myFunction(const Php::Value &value) void myFunction(Php::Value &value) { value += 10; - std::cout << value << std::endl; + Php::out << value << std::endl; if (value == "some string") { @@ -311,8 +311,8 @@ Php::Value array; array["x"] = 10; array["y"] = 20; -std::cout << array["x"] << std::endl; -std::cout << array["y"] << std::endl; +Php::out << array["x"] << std::endl; +Php::out << array["y"] << std::endl; </code></pre> </p> <p> @@ -359,11 +359,11 @@ object["property2"] = "value2"; object = Php::Object("DateTime", "now"); // methods can be called with the call() method -std::cout << object.call("format", "Y-m-d H:i:s") << std::endl; +Php::out << object.call("format", "Y-m-d H:i:s") << std::endl; // all these methods can be called on a Php::Value object too Php::Value value = Php::Object("DateTime", "now"); -std::cout << value.call("format", "Y-m-d H:i:s") << std::endl; +Php::out << value.call("format", "Y-m-d H:i:s") << std::endl; </code></pre> </p> <h2 id="iterating">Iterating</h2> @@ -385,7 +385,7 @@ void myFunction(const Php::Value &value) for (auto &iter : value) { // output key and value - std::cout << iter.first << ": " << iter.second << std::endl; + Php::out << iter.first << ": " << iter.second << std::endl; } } </code></pre> @@ -439,7 +439,7 @@ void myFunction(const Php::Value &value) Php::Value date = "date"; // "date" is a built-in PHP function and thus can it be called -std::cout << date("Y-m-d H:i:s") << std::endl; +Php::out << date("Y-m-d H:i:s") << std::endl; // create a date-time object Php::Object now = Php::Object("DateTime","now"); @@ -453,7 +453,7 @@ array[1] = "format"; // an array with two members can be called too, the first // member is seen as the object, and the second as the // name of the method -std::cout << array("Y-m-d H:i:s") << std::endl; +Php::out << array("Y-m-d H:i:s") << std::endl; </code></pre> </p> <h2 id="global-variables">Global variables</h2> @@ -474,7 +474,7 @@ Php::GLOBALS["b"] = Php::Array({1,2,3,4}); Php::GLOBALS["b"][4] = 5; // and global variables can also be read -std::cout << Php::GLOBALS["b"] << std::endl; +Php::out << Php::GLOBALS["b"] << std::endl; </code></pre> </p> <p> |