diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/simple/simple.cpp | 4 | ||||
-rw-r--r-- | tests/simple/simple.php | 18 |
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/simple/simple.cpp b/tests/simple/simple.cpp index 06d4431..db314ca 100644 --- a/tests/simple/simple.cpp +++ b/tests/simple/simple.cpp @@ -48,7 +48,9 @@ public: * Constructor */ SimpleExtension() : Extension("simple", "1.0", { - PhpCpp::Function("hallo") + PhpCpp::Function("hallo", { + PhpCpp::Argument("arg1", true) + }) }) { } diff --git a/tests/simple/simple.php b/tests/simple/simple.php index 0fb3e32..c8614da 100644 --- a/tests/simple/simple.php +++ b/tests/simple/simple.php @@ -1,3 +1,19 @@ <?php -hallo(); + +class XXX +{ + public function __toString() + { + return "MyClass"; + } +} + +$myvar = "hoi"; + +$result = hallo($myvar, 1, 2, 3, "blabla", new XXX()); + +echo("myvar = $myvar\n"); + +echo("resultaat: $result\n"); + ?>
\ No newline at end of file |