diff options
author | JasperVanEck <jaspergkurtz@gmail.com> | 2013-11-29 17:00:03 +0100 |
---|---|---|
committer | JasperVanEck <jaspergkurtz@gmail.com> | 2013-11-29 17:00:03 +0100 |
commit | 9a7f25aefc4f2ac45a93faa370b52d48cc004221 (patch) | |
tree | ced55bf4219e1b711ab1989ba9462f9e17e874c7 /README.md | |
parent | b9aa9f880951d6bee7fe4b9046c563ad15d905f3 (diff) |
small changes in READMEs
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -34,6 +34,15 @@ Php::Value my_plus(Php::Parameters ¶ms) } ``` +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 |