summaryrefslogtreecommitdiff
path: root/Zend/tests/call_static_002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/call_static_002.phpt')
-rw-r--r--Zend/tests/call_static_002.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/call_static_002.phpt b/Zend/tests/call_static_002.phpt
new file mode 100644
index 0000000..9604bf5
--- /dev/null
+++ b/Zend/tests/call_static_002.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Testing __call and __callstatic with callbacks
+--FILE--
+<?php
+
+class Foo {
+ public function __call($a, $b) {
+ print "nonstatic\n";
+ var_dump($a);
+ }
+ static public function __callStatic($a, $b) {
+ print "static\n";
+ var_dump($a);
+ }
+}
+
+$a = new Foo;
+call_user_func(array($a, 'aAa'));
+call_user_func(array('Foo', 'aAa'));
+
+?>
+--EXPECTF--
+nonstatic
+string(3) "aAa"
+static
+string(3) "aAa"