summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
authorTimm Friebe <thekid@thekid.de>2014-07-06 14:58:20 +0200
committerTimm Friebe <thekid@thekid.de>2014-07-06 14:58:44 +0200
commitff66e597314f39e7015fb7c238c29d8f6e02dcab (patch)
tree09173d23f7bb2bc7244f0c6413a05307883cc238 /Zend/tests
parentdf908275f65dbac0990576db6be0534433f72c0d (diff)
downloadphp-git-ff66e597314f39e7015fb7c238c29d8f6e02dcab.tar.gz
Support nested static calls
Diffstat (limited to 'Zend/tests')
-rwxr-xr-xZend/tests/methods-on-non-objects-nested-calls-static.phpt22
-rw-r--r--Zend/tests/methods-on-non-objects-nested-calls.phpt2
2 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/methods-on-non-objects-nested-calls-static.phpt b/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
new file mode 100755
index 0000000000..9e969b7d68
--- /dev/null
+++ b/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Catch method calls on non-objects with nested calls to static methods
+--FILE--
+<?php
+class Nesting {
+ static function nested() {
+ throw new LogicException('Should not be called');
+ }
+}
+set_error_handler(function($code, $message) {
+ static $i= 0;
+ echo 'Called #'.(++$i)."\n";
+});
+
+$x= null;
+var_dump($x->method(Nesting::nested()));
+echo "Alive\n";
+?>
+--EXPECTF--
+Called #1
+NULL
+Alive
diff --git a/Zend/tests/methods-on-non-objects-nested-calls.phpt b/Zend/tests/methods-on-non-objects-nested-calls.phpt
index 117e29f896..c92b0cb034 100644
--- a/Zend/tests/methods-on-non-objects-nested-calls.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls.phpt
@@ -49,4 +49,6 @@ Called #10
NULL
Called #11
NULL
+Called #12
+NULL
Alive