summaryrefslogtreecommitdiff
path: root/Zend/tests/lsb_022.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/lsb_022.phpt')
-rwxr-xr-xZend/tests/lsb_022.phpt31
1 files changed, 31 insertions, 0 deletions
diff --git a/Zend/tests/lsb_022.phpt b/Zend/tests/lsb_022.phpt
new file mode 100755
index 0000000000..016fde83c9
--- /dev/null
+++ b/Zend/tests/lsb_022.phpt
@@ -0,0 +1,31 @@
+--TEST--
+ZE2 Late Static Binding parent::/self:: forwarding and __callStatic
+--FILE--
+<?php
+class A {
+ static function test() {
+ echo "A\n";
+ }
+ static function __callstatic($name, $args) {
+ call_user_func("static::test");
+ }
+}
+class B extends A {
+ static function test() {
+ echo "B\n";
+ }
+ static function __callstatic($name, $args) {
+ parent::__callstatic($name, $args);
+ call_user_func_array("parent::__callstatic", array($name, $args));
+ parent::foo();
+ call_user_func_array("parent::foo", $args);
+ call_user_func_array(array("parent","foo"), $args);
+ }
+}
+B::foo();
+--EXPECT--
+B
+B
+B
+B
+B