summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJasperVanEck <jaspergkurtz@gmail.com>2013-11-29 17:00:03 +0100
committerJasperVanEck <jaspergkurtz@gmail.com>2013-11-29 17:00:03 +0100
commit9a7f25aefc4f2ac45a93faa370b52d48cc004221 (patch)
treeced55bf4219e1b711ab1989ba9462f9e17e874c7 /README.md
parentb9aa9f880951d6bee7fe4b9046c563ad15d905f3 (diff)
small changes in READMEs
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index fa213ed..8e67d5d 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,15 @@ Php::Value my_plus(Php::Parameters &params)
}
```
+The method call to export the above C++ function:
+
+```c
+extension.add("my_plus", my_plus, {
+Php::ByVal("a", Php::numericType),
+Php::ByVal("b", Php::numericType)
+});
+```
+
The PHP-CPP library ensures that the variables
from PHP (which internally are complicated C structures), are automatically converted into
integers, passed to your function, and that the return value of your "my_plus" function is