summaryrefslogtreecommitdiff
path: root/Examples/README.md
diff options
context:
space:
mode:
authorJasperVanEck <jaspergkurtz@gmail.com>2013-12-02 14:08:45 +0100
committerJasperVanEck <jaspergkurtz@gmail.com>2013-12-02 14:08:45 +0100
commit2f6a58cb1bcb4250652b54416ccf80946adb0c34 (patch)
tree49eb0ea7914cf5dad39ee16c569afe92ce37b1ca /Examples/README.md
parent040f493080df2787557b891713d5f851ac78cae6 (diff)
Updated README.md, implemented more complicated isCallable method and added comments to value.cpp
Diffstat (limited to 'Examples/README.md')
-rw-r--r--Examples/README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/Examples/README.md b/Examples/README.md
index ac66425..5bd9e1e 100644
--- a/Examples/README.md
+++ b/Examples/README.md
@@ -126,10 +126,23 @@ The following examples are available:
implemented. It would need to be implemented for this specific
example to work.
- Functions and/or classes defined in this Example.
+ Functions and/or classes defined in this example.
- void my_catch_exception_function(Php::Parameters &params)
- void my_throw_exception_function()
+### [PHP function calls](https://github.com/EmielBruijntjes/PHP-CPP/tree/master/Examples/CallPhpFunctions)
+
+ The seventh example shows how to pass a callable PHP function as
+ a parameter. As can be seen in the example, there are several ways
+ of passing a PHP function to the C++ function. When a function is
+ passed, it is possible to use the () operator on the parameter, with
+ the correct amount of parameters for the callable PHP function.
+ When using the wrong amount, or when trying to use the () operator
+ on a non-callable type, you will get PHP errors rather than
+ segmentation faults or other kinds of C++ errors.
+
+ Functions and/or classes defined in this example.
+ - Php::Value call_php_function(Php::Parameters &params)