Hi Dan,

Your RFC is going to be accepted and I support the idea, however the patch
looks a bit surprising to me.

Actually, returning NULL from constructors wasn't simple :)
We have special function to do this - zend_ctor_make_null() and some tricks
in the VM.
I made just a quick look over your patch but didn't find any references to
them.

I'll try to improve the patch on next week. Please don't commit it yet.
Nikita, could you also take a quick look.

Thanks. Dmitry.

On Sun, Mar 15, 2015 at 7:09 PM, Dan Ackroyd <dan...@basereality.com> wrote:

> Hi List,
>
> The 'Constructor behaviour of internal classes' RFC is now in voting.
> Please note, it's the coding standard that is being voted on. If
> anyone thinks I've implemented the changes in a way that is less
> awesome then there is no reason the changes couldn't be improved.
>
> Additionally, while writing the change I noticed some things that were
> already present in the code, that are outside the scope of the RFC but
> ought to be fixed for the release of PHP 7.
>
> * Multiple examples of a generic Exception being thrown rather than a
> specific exception being thrown.
>
> * Code generating an error notice and throwing an exception. It should
> be one or the other, not both.
>
> * The text of exceptions in Intl not always being as informative as
> the error message, which could be improved.
>
> But as I said, the vote is on whether the standard behaviour of either
> returning a working instance or throwing an exception, is the standard
> behaviour we want in PHP.
>
> cheers
> Dan
> Ack
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to