Em Mon, 12 Sep 2011 12:53:13 +0100, Sebastian Bergmann <sebast...@php.net> escreveu:

 Regarding state it is important to notice that PHP does *not* execute
 the constructor on all low level calls when instantiating the wrapper
 class - for whatever reason that is the case. Changing that behaviour
 would cause quite some side effects, with possible quite some BC breaks.

This is a bit off-topic, but could you elaborate on this (possibly submitting a bug report)? I see user_wrapper_opener trying to call the constructor:

http://lxr.php.net/opengrok/xref/PHP_5_3/main/streams/userspace.c#298

So any failure to do this would be a bug.

BTW, another advantage of the proposed change is that you can have stream wrappers with constructors that take arguments. For the record, I'm in favor of this, even though I don't buy the testability claim. My point yesterday was mainly the RFC did not explain the advantages very clearly.

--
Gustavo Lopes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to