|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-06 23:39 UTC] helly@php.net
[2006-03-05 19:24 UTC] helly@php.net
[2006-06-01 09:47 UTC] stochnagara at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 23:00:02 2025 UTC |
Description: ------------ When a class implements an interface which declares a funciton __construct with a given prototype and the class does not follow this prototype, then PHP does not raise a fatal error like in all other cases. I know that __construct has a lot of special features but I think we need at least a notice for that. Reproduce code: --------------- interface constr { function __construct(); } class implem implements constr { function __construct ($a) { } } Expected result: ---------------- Fatal error: Declaration of implem::__construct() must be compatible with that of constr::__construct() in ... Actual result: -------------- 5