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.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/Examples/CallPhpFunctions/callphpfunction.php b/Examples/CallPhpFunctions/callphpfunction.php
index 77d633c..8da284d 100644
--- a/Examples/CallPhpFunctions/callphpfunction.php
+++ b/Examples/CallPhpFunctions/callphpfunction.php
@@ -1,33 +1,33 @@
<?php
/**
- * callphpfunction.php
- * @author Jasper van Eck<jasper.vaneck@copernica.com>
+ * callphpfunction.php
+ * @author Jasper van Eck<jasper.vaneck@copernica.com>
*
- * An example file to show the working of a php function call in C++.
+ * An example file to show the working of a php function call in C++.
*/
class MyClass
{
- function method($a,$b,$c)
- {
- return $a+$b+$c;
- }
+ function method($a,$b,$c)
+ {
+ return $a+$b+$c;
+ }
}
function myFunction($a,$b,$c)
{
- return $a+$b+$c;
+ return $a+$b+$c;
}
/**
- * Call a C++ function with a callable PHP function as its parameter.
- * The PHP function is then executed from the C++ code.
- * The PHP function is this case, adds three numbers.
+ * Call a C++ function with a callable PHP function as its parameter.
+ * The PHP function is then executed from the C++ code.
+ * The PHP function is this case, adds three numbers.
*/
echo(call_php_function(function($a, $b, $c){
- return $a + $b + $c;
- })."\n");
-
+ return $a + $b + $c;
+ })."\n");
+
echo(call_php_function("myFunction")."\n");
-
+
echo(call_php_function(array(new MyClass(), 'method'))."\n");