From 9a7f25aefc4f2ac45a93faa370b52d48cc004221 Mon Sep 17 00:00:00 2001 From: JasperVanEck Date: Fri, 29 Nov 2013 17:00:03 +0100 Subject: small changes in READMEs --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ¶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 -- cgit v1.2.3