Re: [RFC] [VOTE] pecl_http

From: Date: Wed, 28 Jan 2015 21:03:59 +0000
Subject: Re: [RFC] [VOTE] pecl_http
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

> Related to this: is it even possible for an internal class to rely on
> and formally, explicitly “implement” a userland interface? It’s all

It's probably not a very good idea - internal classes are supposed to be
alive at the start of the request, but the userland interfaces can't be
there yet. Also, what happens if you try to use the internal class but
userland interface is not there yet? I don't think it is a feasible thing.

> very well if PHP has a built-in implementation that follows PSR-7,
> but it would suck if you couldn’t pass an instance of that class to a
> function with a (hypothetical) psr7\HttpMessage type hint.

You could, in theory, have extension defining those interfaces and
autoload userland definitions only if the extension is not present.

-- 
Stas Malyshev
[email protected]


Thread (53 messages)

« previous php.internals (#81342) next »