summaryrefslogtreecommitdiff
path: root/tests/classes/final_ctor3.phpt
blob: b34996c979aaf4ee703967263e4f8aeeecf54c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Ensure implicit final inherited old-style constructor cannot be overridden.
--FILE--
<?php
  class A {
      final function A() { }
  }
  class B extends A {
      function A() { }
  }
?>
--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

Fatal error: Cannot override final method A::A() in %s on line %d