streamWrapper::__construct

(PHP 4 >= 4.3.2, PHP 5, PHP 7)

streamWrapper::__constructConstructs a new stream wrapper

설명

streamWrapper::__construct ( void )

Called when opening the stream wrapper, right before streamWrapper::stream_open().

인수

이 함수는 인수가 없습니다.

add a note add a note

User Contributed Notes 2 notes

up
1
Anonymous
11 years ago
Note, https://bugs.php.net/bug.php?id=40459 shows that __construct() not being called in all cases was a bug, and it was fixed in August 2012.
up
0
codeslinger at compsalot dot com
15 years ago
Just to clarify what was said above, as far as I can tell,  __construct is *only* called before stream_open.

It does not get called for other functions such as stream::url_stat  or stream::unlink, even though those functions do create a new object.

This behavior is contrary to normal expectations for php object creation.  But based on the documentation above I can only assume that it is by design.
To Top