diff options
Diffstat (limited to 'Zend/tests')
42 files changed, 212 insertions, 47 deletions
diff --git a/Zend/tests/019.phpt b/Zend/tests/019.phpt index 654f86bb11..0548a38f88 100644 --- a/Zend/tests/019.phpt +++ b/Zend/tests/019.phpt @@ -201,7 +201,7 @@ class Point var $y; var $lable; - function Point($x, $y) { + function __construct($x, $y) { $this->x = $x; $this->y = $y; } @@ -1271,7 +1271,7 @@ bool(false) bool(true) array(3) { [0]=> - string(5) "Point" + string(11) "__construct" [1]=> string(8) "setLable" [2]=> diff --git a/Zend/tests/add_002.phpt b/Zend/tests/add_002.phpt index 437ac9113a..ca3b3eb6af 100644 --- a/Zend/tests/add_002.phpt +++ b/Zend/tests/add_002.phpt @@ -8,12 +8,22 @@ $a = array(1,2,3); $o = new stdclass; $o->prop = "value"; +try { + var_dump($a + $o); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a + $o; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Notice: Object of class stdClass could not be converted to int in %sadd_002.php on line %d + +Exception: Unsupported operand types + Notice: Object of class stdClass could not be converted to int in %s on line %d Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 4223af3f19..f0c9314b2d 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -8,12 +8,22 @@ $a = array(1,2,3); $o = new stdclass; $o->prop = "value"; +try { + var_dump($o + $a); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $o + $a; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Notice: Object of class stdClass could not be converted to int in %sadd_003.php on line %d + +Exception: Unsupported operand types + Notice: Object of class stdClass could not be converted to int in %s on line %d Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/add_004.phpt b/Zend/tests/add_004.phpt index 492ff31ba3..5629ed2ea4 100644 --- a/Zend/tests/add_004.phpt +++ b/Zend/tests/add_004.phpt @@ -5,10 +5,18 @@ adding numbers to arrays $a = array(1,2,3); +try { + var_dump($a + 5); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a + 5; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/add_007.phpt b/Zend/tests/add_007.phpt index b2f1559b7a..b7d44a8683 100644 --- a/Zend/tests/add_007.phpt +++ b/Zend/tests/add_007.phpt @@ -7,10 +7,18 @@ $a = array(1,2,3); $s1 = "some string"; +try { + var_dump($a + $s1); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a + $s1; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/bug18556.phpt b/Zend/tests/bug18556.phpt index 036abb2ada..f8e48c2772 100644 --- a/Zend/tests/bug18556.phpt +++ b/Zend/tests/bug18556.phpt @@ -8,7 +8,7 @@ setlocale(LC_ALL, $g_lang); class InfoBlob { var $foo; - function InfoBlob() { + function __construct() { $this->foo = "Foo"; } } diff --git a/Zend/tests/bug20240.phpt b/Zend/tests/bug20240.phpt index acf673a277..53bb050576 100644 --- a/Zend/tests/bug20240.phpt +++ b/Zend/tests/bug20240.phpt @@ -9,7 +9,7 @@ class test { public $member; - function test() { + function __construct() { $this->member = 1; register_shutdown_function(array($this, 'destructor')); } diff --git a/Zend/tests/bug30080.phpt b/Zend/tests/bug30080.phpt index 8cac75ab8d..ff4a82b21f 100644 --- a/Zend/tests/bug30080.phpt +++ b/Zend/tests/bug30080.phpt @@ -3,7 +3,7 @@ Bug #30080 (Passing array or non array of objects) --FILE-- <?php class foo { - function foo($arrayobj) { + function __construct($arrayobj) { var_dump($arrayobj); } } diff --git a/Zend/tests/bug31177-2.phpt b/Zend/tests/bug31177-2.phpt index 10083c59ed..6cba62cedf 100644 --- a/Zend/tests/bug31177-2.phpt +++ b/Zend/tests/bug31177-2.phpt @@ -3,13 +3,13 @@ Bug #31177 (memory corruption because of incorrect refcounting) --FILE-- <?php class foo { - function foo($n=0) { + function __construct($n=0) { if($n) throw new Exception("new"); } } $x = new foo(); try { - $y=$x->foo(1); + $y=$x->__construct(1); } catch (Exception $e) { var_dump($x); } diff --git a/Zend/tests/bug32226.phpt b/Zend/tests/bug32226.phpt index 9536c921a3..f8e13cfb6e 100644 --- a/Zend/tests/bug32226.phpt +++ b/Zend/tests/bug32226.phpt @@ -5,7 +5,7 @@ Bug #32226 (SEGV with exception handler on non existing instance) class A { - public function A() + public function __construct() { set_exception_handler(array($this, 'EH')); diff --git a/Zend/tests/bug38942.phpt b/Zend/tests/bug38942.phpt index 85bb56d200..d0335b1071 100644 --- a/Zend/tests/bug38942.phpt +++ b/Zend/tests/bug38942.phpt @@ -10,7 +10,8 @@ class bar extends foo { } print_r(get_class_methods("bar")); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d Array ( [0] => foo diff --git a/Zend/tests/bug39127.phpt b/Zend/tests/bug39127.phpt index a013da145e..2f5b0fd2bf 100644 --- a/Zend/tests/bug39127.phpt +++ b/Zend/tests/bug39127.phpt @@ -14,6 +14,7 @@ var_dump(is_callable(array($b,"__construct"))); echo "Done\n"; ?> --EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; a has a deprecated constructor in %s on line %d string(13) "a::a() called" bool(true) bool(false) diff --git a/Zend/tests/bug39542/bug39542.php b/Zend/tests/bug39542/bug39542.php index 90cb36cc68..13b3b3eaf4 100755 --- a/Zend/tests/bug39542/bug39542.php +++ b/Zend/tests/bug39542/bug39542.php @@ -1,6 +1,6 @@ <?php class bug39542 { - function bug39542() { + function __construct() { echo "ok\n"; } } diff --git a/Zend/tests/bug40784.phpt b/Zend/tests/bug40784.phpt index 6da8f2a16b..a103d4a01c 100644 --- a/Zend/tests/bug40784.phpt +++ b/Zend/tests/bug40784.phpt @@ -19,6 +19,7 @@ $b = new B; echo "Done\n"; ?> --EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in %s on line %d I'm A I'm A Done diff --git a/Zend/tests/bug43323.phpt b/Zend/tests/bug43323.phpt index d366a6dd1f..74abe766e5 100644 --- a/Zend/tests/bug43323.phpt +++ b/Zend/tests/bug43323.phpt @@ -9,4 +9,6 @@ abstract class bar { class foo extends bar { } --EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bar has a deprecated constructor in %s on line %d + Fatal error: Class foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (bar::bar) in %sbug43323.php on line 7 diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt index 4d58e9fdf3..6479d0c8a4 100644 --- a/Zend/tests/bug46381.phpt +++ b/Zend/tests/bug46381.phpt @@ -1,17 +1,15 @@ --TEST-- Bug #46381 (wrong $this passed to internal methods causes segfault) ---SKIPIF-- -<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?> --FILE-- <?php class test { - public function test() { + public function method() { return ArrayIterator::current(); } } $test = new test(); -$test->test(); +$test->method(); echo "Done\n"; ?> diff --git a/Zend/tests/bug47343.phpt b/Zend/tests/bug47343.phpt index 07a3b4e330..b0b7977beb 100644 --- a/Zend/tests/bug47343.phpt +++ b/Zend/tests/bug47343.phpt @@ -20,7 +20,7 @@ class A class B { - public function B($A) + public function __construct($A) { $this->A = $A; } diff --git a/Zend/tests/bug48215_2.phpt b/Zend/tests/bug48215_2.phpt index 199a252208..da6b7a84b6 100644 --- a/Zend/tests/bug48215_2.phpt +++ b/Zend/tests/bug48215_2.phpt @@ -8,7 +8,7 @@ class a { } class b extends a {} class c extends b { - function C() { + function __construct() { b::b(); } } diff --git a/Zend/tests/bug50261.phpt b/Zend/tests/bug50261.phpt index 271a2c4805..ce120b9416 100644 --- a/Zend/tests/bug50261.phpt +++ b/Zend/tests/bug50261.phpt @@ -30,7 +30,8 @@ class testClass2 extends testClass { new testClass2; ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; testClass has a deprecated constructor in %s on line %d testClass::testClass (1) testClass::testClass (2) testClass::testClass (3) diff --git a/Zend/tests/bug52051.phpt b/Zend/tests/bug52051.phpt index e8a4f49e3c..acfddbc36d 100644 --- a/Zend/tests/bug52051.phpt +++ b/Zend/tests/bug52051.phpt @@ -22,6 +22,13 @@ class C extends B { new C(); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; AA has a deprecated constructor in %s on line %d + +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CC has a deprecated constructor in %s on line %d + +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in %s on line %d + +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; C has a deprecated constructor in %s on line %d foo bar diff --git a/Zend/tests/bug52160.phpt b/Zend/tests/bug52160.phpt index c85d2f09af..a0e5a9d7ae 100644 --- a/Zend/tests/bug52160.phpt +++ b/Zend/tests/bug52160.phpt @@ -29,6 +29,6 @@ class baz { ?> --EXPECTF-- -Strict Standards: Redefining already defined constructor for class foo in %s on line %d +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; baz has a deprecated constructor in %s on line %d Fatal error: Constructor baz::baz() cannot be static in %s on line %d diff --git a/Zend/tests/bug60536_001.phpt b/Zend/tests/bug60536_001.phpt index a94e21ecee..37a5a6d813 100644 --- a/Zend/tests/bug60536_001.phpt +++ b/Zend/tests/bug60536_001.phpt @@ -8,17 +8,17 @@ class X { } class Y extends X { use T; - function x() { + function __construct() { return ++$this->x; } } class Z extends Y { - function z() { + function __construct() { return ++$this->x; } } $a = new Z(); -$a->x(); +$a->__construct(); echo "DONE"; ?> --EXPECTF-- diff --git a/Zend/tests/bug65108.phpt b/Zend/tests/bug65108.phpt index d3e5a65b26..23e1e856d7 100644 --- a/Zend/tests/bug65108.phpt +++ b/Zend/tests/bug65108.phpt @@ -8,7 +8,7 @@ class C { } class B { - public function B() { + public function __construct() { $isCallable = is_callable(array(new C, 'f')); var_dump($isCallable); } diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt index aab163d915..b8b97dd777 100644 --- a/Zend/tests/bug65322.phpt +++ b/Zend/tests/bug65322.phpt @@ -13,10 +13,12 @@ set_error_handler(function($_, $msg, $file) { new B; }); -eval('class A { function a() {} function __construct() {} }'); +/* This is just a particular example of a non-fatal compile-time error + * If this breaks in future, just find another example and use it instead */ +eval('abstract class foo { abstract static function bar(); }'); ?> --EXPECTF-- -string(50) "Redefining already defined constructor for class A" +string(%d) "Static function foo::bar() should not be abstract" string(%d) "%s(%d) : eval()'d code" string(1) "B" diff --git a/Zend/tests/constant_expressions_exceptions.inc b/Zend/tests/constant_expressions_exceptions.inc new file mode 100644 index 0000000000..2b8f3befdb --- /dev/null +++ b/Zend/tests/constant_expressions_exceptions.inc @@ -0,0 +1,2 @@ +<?php +const T = array(1,2) - array(0); diff --git a/Zend/tests/constant_expressions_exceptions_001.phpt b/Zend/tests/constant_expressions_exceptions_001.phpt new file mode 100644 index 0000000000..076584a569 --- /dev/null +++ b/Zend/tests/constant_expressions_exceptions_001.phpt @@ -0,0 +1,7 @@ +--TEST-- +Constant Expressions with unsupported operands 001 +--FILE-- +<?php +const T = array(1,2) - array(0); +--EXPECTF-- +Fatal error: Unsupported operand types in %sconstant_expressions_exceptions_001.php on line 2 diff --git a/Zend/tests/constant_expressions_exceptions_002.phpt b/Zend/tests/constant_expressions_exceptions_002.phpt new file mode 100644 index 0000000000..3259483197 --- /dev/null +++ b/Zend/tests/constant_expressions_exceptions_002.phpt @@ -0,0 +1,13 @@ +--TEST-- +Constant Expressions with unsupported operands 002 +--FILE-- +<?php +try { + require("constant_expressions_exceptions.inc"); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} +?> +DONE +--EXPECTF-- +Fatal error: Unsupported operand types in %sconstant_expressions_exceptions.inc on line 2 diff --git a/Zend/tests/div_002.phpt b/Zend/tests/div_002.phpt index 6ade1d9f51..b74743380c 100644 --- a/Zend/tests/div_002.phpt +++ b/Zend/tests/div_002.phpt @@ -6,10 +6,18 @@ dividing arrays $a = array(1,2,3); $b = array(1); +try { + var_dump($a / $b); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a / $b; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/dynamic_call_001.phpt b/Zend/tests/dynamic_call_001.phpt index 94e4203caf..9a22dc2c6b 100644 --- a/Zend/tests/dynamic_call_001.phpt +++ b/Zend/tests/dynamic_call_001.phpt @@ -14,4 +14,6 @@ $a::$a(); ?> --EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d + Fatal error: Non-static method foo::foo() cannot be called statically in %s on line %d diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt index b27f67ade4..331425ad9c 100644 --- a/Zend/tests/errmsg_045.phpt +++ b/Zend/tests/errmsg_045.phpt @@ -8,11 +8,13 @@ set_error_handler(function($_, $msg, $file) { echo $undefined; }); -eval('class A { function a() {} function __construct() {} }'); +/* This is just a particular example of a non-fatal compile-time error + * If this breaks in future, just find another example and use it instead */ +eval('abstract class foo { abstract static function bar(); }'); ?> --EXPECTF-- -string(50) "Redefining already defined constructor for class A" +string(%d) "Static function foo::bar() should not be abstract" string(%d) "%s(%d) : eval()'d code" Notice: Undefined variable: undefined in %s on line %d diff --git a/Zend/tests/exception_013.phpt b/Zend/tests/exception_013.phpt new file mode 100644 index 0000000000..72e9377866 --- /dev/null +++ b/Zend/tests/exception_013.phpt @@ -0,0 +1,36 @@ +--TEST-- +Exceptions on improper access to static class properties +--FILE-- +<?php +class C { + static private $p = 0; +} + +try { + var_dump(C::$a); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +try { + var_dump(C::$p); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +try { + unset(C::$a); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +var_dump(C::$a); +?> +--EXPECTF-- +Exception: Access to undeclared static property: C::$a in %sexception_013.php on line 7 + +Exception: Cannot access private property C::$p in %sexception_013.php on line 13 + +Exception: Attempt to unset static property C::$a in %sexception_013.php on line 19 + +Fatal error: Access to undeclared static property: C::$a in %sexception_013.php on line 24 diff --git a/Zend/tests/exception_014.phpt b/Zend/tests/exception_014.phpt new file mode 100644 index 0000000000..71bb14df1d --- /dev/null +++ b/Zend/tests/exception_014.phpt @@ -0,0 +1,21 @@ +--TEST-- +Exceptions on improper access to static class properties +--FILE-- +<?php +class C { + private $p = 0; +} + +$x = new C; +try { + var_dump($x->p); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +var_dump($x->p); +?> +--EXPECTF-- +Exception: Cannot access private property C::$p in %sexception_014.php on line %d + +Fatal error: Cannot access private property C::$p in %sexception_014.php on line %d diff --git a/Zend/tests/get_class_methods_001.phpt b/Zend/tests/get_class_methods_001.phpt index 277ea2cf5a..a2a3d0ca20 100644 --- a/Zend/tests/get_class_methods_001.phpt +++ b/Zend/tests/get_class_methods_001.phpt @@ -3,30 +3,30 @@ get_class_methods(): Testing scope --FILE-- <?php -abstract class A { +abstract class X { public function a() { } private function b() { } protected function c() { } } -class B extends A { +class Y extends X { private function bb() { } static public function test() { - var_dump(get_class_methods('A')); - var_dump(get_class_methods('B')); + var_dump(get_class_methods('X')); + var_dump(get_class_methods('Y')); } } -var_dump(get_class_methods('A')); -var_dump(get_class_methods('B')); +var_dump(get_class_methods('X')); +var_dump(get_class_methods('Y')); -B::test(); +Y::test(); ?> ---EXPECT-- +--EXPECTF-- array(1) { [0]=> string(1) "a" diff --git a/Zend/tests/get_class_methods_002.phpt b/Zend/tests/get_class_methods_002.phpt index 27da6e8d9b..62f326c053 100644 --- a/Zend/tests/get_class_methods_002.phpt +++ b/Zend/tests/get_class_methods_002.phpt @@ -24,7 +24,6 @@ new B; ?> --EXPECTF-- -Strict Standards: Redefining already defined constructor for class B in %s on line %d array(2) { [0]=> string(1) "a" diff --git a/Zend/tests/get_class_methods_003.phpt b/Zend/tests/get_class_methods_003.phpt index bbb758625b..5c3c09f4e0 100644 --- a/Zend/tests/get_class_methods_003.phpt +++ b/Zend/tests/get_class_methods_003.phpt @@ -3,13 +3,13 @@ get_class_methods(): Testing scope --FILE-- <?php -interface A { +interface I { function aa(); function bb(); static function cc(); } -class C { +class X { public function a() { } protected function b() { } private function c() { } @@ -19,22 +19,22 @@ class C { static private function static_c() { } } -class B extends C implements A { +class Y extends X implements I { public function aa() { } public function bb() { } static function cc() { } public function __construct() { - var_dump(get_class_methods('A')); - var_dump(get_class_methods('B')); - var_dump(get_class_methods('C')); + var_dump(get_class_methods('I')); + var_dump(get_class_methods('Y')); + var_dump(get_class_methods('X')); } public function __destruct() { } } -new B; +new Y; ?> --EXPECT-- diff --git a/Zend/tests/mul_001.phpt b/Zend/tests/mul_001.phpt index 4c5a75e7d1..2a827af74f 100644 --- a/Zend/tests/mul_001.phpt +++ b/Zend/tests/mul_001.phpt @@ -6,10 +6,18 @@ multiplying arrays $a = array(1,2,3); $b = array(1); +try { + var_dump($a * $b); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a * $b; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/not_002.phpt b/Zend/tests/not_002.phpt index df27772a73..4c9be5befa 100644 --- a/Zend/tests/not_002.phpt +++ b/Zend/tests/not_002.phpt @@ -6,10 +6,18 @@ bitwise NOT and arrays $a = array(1,2,3); $b = array(1,2); +try { + var_dump(~$b); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $a = ~$b; var_dump($a); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/objects_010.phpt b/Zend/tests/objects_010.phpt index 5d004629d9..0f85498e2c 100644 --- a/Zend/tests/objects_010.phpt +++ b/Zend/tests/objects_010.phpt @@ -1,7 +1,5 @@ --TEST-- redefining constructor (__construct second) ---INI-- -error_reporting=8191 --FILE-- <?php @@ -15,5 +13,4 @@ class test { echo "Done\n"; ?> --EXPECTF-- -Strict Standards: Redefining already defined constructor for class test in %s on line %d Done diff --git a/Zend/tests/return_types/023.phpt b/Zend/tests/return_types/023.phpt index 61a9e1c4e0..9e36bf7c04 100644 --- a/Zend/tests/return_types/023.phpt +++ b/Zend/tests/return_types/023.phpt @@ -9,4 +9,6 @@ class Foo { } --EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in %s on line %d + Fatal error: Constructor %s::%s() cannot declare a return type in %s on line %s diff --git a/Zend/tests/sub_001.phpt b/Zend/tests/sub_001.phpt index 2a8b3cdffd..a9438fdcde 100644 --- a/Zend/tests/sub_001.phpt +++ b/Zend/tests/sub_001.phpt @@ -6,10 +6,18 @@ subtracting arrays $a = array(1,2,3); $b = array(1); +try { + var_dump($a - $b); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $a - $b; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Exception: Unsupported operand types + Fatal error: Unsupported operand types in %s on line %d diff --git a/Zend/tests/traits/bug55554b.phpt b/Zend/tests/traits/bug55554b.phpt index bf40e89a08..06229bac34 100644 --- a/Zend/tests/traits/bug55554b.phpt +++ b/Zend/tests/traits/bug55554b.phpt @@ -50,6 +50,8 @@ $o = new ReportCollision; --EXPECTF-- OverridingIsSilent1 __construct + +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; OverridingIsSilent2 has a deprecated constructor in %s on line %d OverridingIsSilent2 OverridingIsSilent2 Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d diff --git a/Zend/tests/traits/noctor001.phpt b/Zend/tests/traits/noctor001.phpt index d15acff87a..19fe8dbd0d 100644 --- a/Zend/tests/traits/noctor001.phpt +++ b/Zend/tests/traits/noctor001.phpt @@ -22,7 +22,8 @@ var_dump($rbarfoo->isConstructor()); $rbarbar = new ReflectionMethod('Bar::Bar'); var_dump($rbarbar->isConstructor()); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Bar has a deprecated constructor in %s on line %d bool(false) bool(false) bool(true) |
