summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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