summaryrefslogtreecommitdiff
path: root/Examples/CallPhpFunctions/callphpfunction.php
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/CallPhpFunctions/callphpfunction.php')
-rw-r--r--Examples/CallPhpFunctions/callphpfunction.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/CallPhpFunctions/callphpfunction.php b/Examples/CallPhpFunctions/callphpfunction.php
new file mode 100644
index 0000000..26f161c
--- /dev/null
+++ b/Examples/CallPhpFunctions/callphpfunction.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * callphpfunction.php
+ * @author Jasper van Eck<jasper.vaneck@copernica.com>
+ *
+ * An example file to show the working of a php function call in C++.
+ */
+
+/*
+ * Run the function with the given name. As you can see, the given name
+ * can be different from the actual function name.
+ */
+$result = call_php_function(function($a, $b, $c){
+ return $a + $b + $c;
+ });
+echo $result;