|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2011-07-01 18:56 UTC] felipe@php.net
 
-Package: Class/Object related
+Package: Documentation problem
  [2011-07-01 18:56 UTC] felipe@php.net
  [2011-09-17 09:15 UTC] nikic@php.net
 
-Type: Bug
+Type: Documentation Problem
  [2011-09-17 09:54 UTC] nikic@php.net
  [2011-09-17 10:01 UTC] nikic@php.net
  [2011-09-17 10:01 UTC] nikic@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: nikic
  [2011-09-17 10:01 UTC] nikic@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
Description: ------------ PHP 5.* allows changing an abstract __construct() signature without any notice. PHP 5.4 issues fatal error. I didn't find this BC break in news.txt so I think that it is a bug. Test script: --------------- <?php abstract class P { abstract function __construct(); } class C extends P { function __construct($a) { } } ?> Expected result: ---------------- Nothing - same as in PHP 5.*. The strange thing is that if we replace "abstract function __construct();" by "function __construct() {}" then the behavior is same as in previous versions. Actual result: -------------- Fatal error: Declaration of C::__construct() must be compatible with that of P::__construct()