Re: [RFC][DISCUSSION] Constructor behaviour of internal classes

From: Date: Sun, 01 Mar 2015 18:35:59 +0000
Subject: Re: [RFC][DISCUSSION] Constructor behaviour of internal classes
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-84111@lists.php.net to get a copy of this message
Hi Dan, Am 01.03.2015 um 15:55 schrieb Dan Ackroyd:
Hi Internals, This email is to announce the formal opening of discussion for an RFC to clean up the behaviour of the constructors shown by several internal classes. https://wiki.php.net/rfc/internal_constructor_behaviour I really like this RFC as it reduces WTF moments a lot!
One note from my perspective: The class "PDORow" is not instantiable and triggers a fatal errors currently. You propose to change the fatal error into an exception. That's definitely better but it's an behavior not possible to implemented in user land code as it would be impossible to get such an object. To define a class not instantiable in user land would be to define the constructor private/protected. Btw. What are the reasons to not make this class instantiable / extendable ? Thoughts?
For reference this was discussed before https://marc.info/?l=php-internals&m=142150339323854&w=2 As this RFC targets PHP 7, I plan to open the voting before the cut-off date. cheers Dan


« previous php.internals (#84111) next »