From 7c0b830e9873c60aaf18ea6dee38a6022a2c2576 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Wed, 13 Sep 2017 15:07:42 +0000 Subject: [PATCH] Fixed bug #75202 (Interfaces shouldn't be able to define a constructor) We document that interfaces allow constructors to be declared. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343082 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/interfaces.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/language/oop5/interfaces.xml b/language/oop5/interfaces.xml index b946538a2d..f549fad07c 100644 --- a/language/oop5/interfaces.xml +++ b/language/oop5/interfaces.xml @@ -1,6 +1,6 @@ - + Object Interfaces Object interfaces allow you to create code which specifies which methods a @@ -16,6 +16,11 @@ All methods declared in an interface must be public; this is the nature of an interface. + + Note that it is possible to declare a constructor in an interface, + what can be useful in some contexts, e.g. for use by factories. + <literal>implements</literal>