diff options
Diffstat (limited to 'php/tests/stepA_mal.mal')
| -rw-r--r-- | php/tests/stepA_mal.mal | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/php/tests/stepA_mal.mal b/php/tests/stepA_mal.mal new file mode 100644 index 0000000..15f8a94 --- /dev/null +++ b/php/tests/stepA_mal.mal @@ -0,0 +1,25 @@ +;; Testing basic php interop + +(php* "return 7;") +;=>7 + +(php* "return '7';") +;=>"7" + +(php* "return array(7,8,9);") +;=>(7 8 9) + +(php* "return array(\"abc\" => 789);") +;=>{"abc" 789} + +(php* "print \"hello\n\";") +; hello +;=>nil + +(php* "global $foo; $foo=8;") +(php* "global $foo; return $foo;") +;=>8 + +(php* "global $f; $f = function($v) { return 1+$v; };") +(php* "global $f; return array_map($f, array(1,2,3));") +;=>(2 3 4) |
