diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-06-16 00:42:50 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-06-16 00:42:50 +0200 |
commit | 7cef3a57ad7fd64e5789648ed476666f1cbc598c (patch) | |
tree | 46534215843a29f83b7b93f70e5c279b60f2cf3d | |
parent | 0913c1509295a7db8cfc33e3b50cd1bc948b1864 (diff) | |
parent | 03ee0ddc5f705bcf0c88ade77d8b9aa8b9f68d57 (diff) | |
download | php-git-7cef3a57ad7fd64e5789648ed476666f1cbc598c.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
-rw-r--r-- | Zend/tests/bug67436/a.php | 10 | ||||
-rw-r--r-- | Zend/tests/bug67436/b.php | 8 | ||||
-rw-r--r-- | Zend/tests/bug67436/bug67436.phpt | 26 | ||||
-rw-r--r-- | Zend/tests/bug67436/bug67436_nohandler.phpt | 24 | ||||
-rw-r--r-- | Zend/tests/bug67436/c.php | 5 |
5 files changed, 73 insertions, 0 deletions
diff --git a/Zend/tests/bug67436/a.php b/Zend/tests/bug67436/a.php new file mode 100644 index 0000000000..c560c2db7d --- /dev/null +++ b/Zend/tests/bug67436/a.php @@ -0,0 +1,10 @@ +<?php + +class a { + public function test($arg = c::TESTCONSTANT) { + echo __METHOD__ . "($arg)\n"; + } + + static public function staticTest() { + } +} diff --git a/Zend/tests/bug67436/b.php b/Zend/tests/bug67436/b.php new file mode 100644 index 0000000000..793a1394d6 --- /dev/null +++ b/Zend/tests/bug67436/b.php @@ -0,0 +1,8 @@ +<?php + +class b extends a { + public function test() { + echo __METHOD__ . "()\n"; + parent::test(); + } +} diff --git a/Zend/tests/bug67436/bug67436.phpt b/Zend/tests/bug67436/bug67436.phpt new file mode 100644 index 0000000000..49b8b491d2 --- /dev/null +++ b/Zend/tests/bug67436/bug67436.phpt @@ -0,0 +1,26 @@ +--TEST-- +bug67436: Autoloader isn't called if user defined error handler is present + +--INI-- +error_reporting= + +--FILE-- +<?php + +spl_autoload_register(function($classname) { + if (in_array($classname, array('a','b','c'))) { + require_once ($classname . '.php'); + } +}); + +set_error_handler(function ($errno, $errstr, $errfile, $errline) { +}, error_reporting()); + +a::staticTest(); + +$b = new b(); +$b->test(); + +--EXPECT-- +b::test() +a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt new file mode 100644 index 0000000000..464f711532 --- /dev/null +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -0,0 +1,24 @@ +--TEST-- +bug67436: E_STRICT instead of custom error handler + +--INI-- +error_reporting=-1 + +--FILE-- +<?php + +spl_autoload_register(function($classname) { + if (in_array($classname, array('a','b','c'))) { + require_once ($classname . '.php'); + } +}); + +a::staticTest(); + +$b = new b(); +$b->test(); + +--EXPECTF-- +Strict Standards: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s/bug67436/b.php on line %d +b::test() +a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/c.php b/Zend/tests/bug67436/c.php new file mode 100644 index 0000000000..47c848bfa0 --- /dev/null +++ b/Zend/tests/bug67436/c.php @@ -0,0 +1,5 @@ +<?php + +class c { + const TESTCONSTANT = "c::TESTCONSTANT"; +} |