summaryrefslogtreecommitdiff
path: root/documentation/calling-functions-and-methods.html
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-08 14:15:15 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-08 14:15:15 +0100
commit78e7865b8dac7229bdc128af870a4cad11cf1cd2 (patch)
treeff0a660ca7916e7c7d5e75d3f82a09033d514a39 /documentation/calling-functions-and-methods.html
parent2c484adbab9255498953739cb4d9751353cc804d (diff)
exception is now thrown when a function is called that does not exist
Diffstat (limited to 'documentation/calling-functions-and-methods.html')
-rw-r--r--documentation/calling-functions-and-methods.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/documentation/calling-functions-and-methods.html b/documentation/calling-functions-and-methods.html
index da3b57c..47a3bf9 100644
--- a/documentation/calling-functions-and-methods.html
+++ b/documentation/calling-functions-and-methods.html
@@ -57,7 +57,7 @@ void example_function(Php::Parameters &amp;params)
// in PHP it is possible to create an array with two parameters, the first
// parameter being an object, and the second parameter should be the name
// of the method, we can do that in PHP-CPP too
- Php::Array time_format(time, "format");
+ Php::Array time_format({time, "format"});
// call the method that is stored in the array
std::cout &lt;&lt; time_format("Y-m-d H:i:s") &lt;&lt; std::endl;
@@ -143,3 +143,16 @@ extern "C" {
});
?&gt;</code></pre>
</p>
+<p>
+ This above script will generate output similar to this:
+<p>
+<pre>
+key: x
+key: y
+key: z
+userspace function called with some_parameter
+2014-03-08 13:55:54
+lambda function called with param some parameter
+2014-03-08 13:55:54
+</pre>
+</p> \ No newline at end of file