Annotation of embedaddon/php/Zend/tests/bug52160.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #52160 (Invalid E_STRICT redefined constructor error)
! 3: --FILE--
! 4: <?php
! 5:
! 6: class bar {
! 7: function __construct() { }
! 8: static function bar() {
! 9: var_dump(1);
! 10: }
! 11: }
! 12:
! 13: bar::bar();
! 14:
! 15: class foo {
! 16: static function foo() {
! 17: var_dump(2);
! 18: }
! 19: function __construct() { }
! 20: }
! 21:
! 22: foo::foo();
! 23:
! 24: class baz {
! 25: static function baz() {
! 26: var_dump(3);
! 27: }
! 28: }
! 29:
! 30: ?>
! 31: --EXPECTF--
! 32: Strict Standards: Redefining already defined constructor for class foo in %s on line %d
! 33:
! 34: Fatal error: Constructor baz::baz() cannot be static in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>