Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81342 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58230 invoked from network); 28 Jan 2015 21:04:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2015 21:04:03 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.41 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.41 mail-pa0-f41.google.com Received: from [209.85.220.41] ([209.85.220.41:39206] helo=mail-pa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/A2-44076-3CE49C45 for ; Wed, 28 Jan 2015 16:04:03 -0500 Received: by mail-pa0-f41.google.com with SMTP id kq14so29720963pab.0 for ; Wed, 28 Jan 2015 13:04:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=SifIUKYrnbzUsUq3abav4hoc6Pb+JUxYpHEu8thh3Zs=; b=TLDFitUg8xP5wcups0MMeBPCRJt5xlvuh1V1BtN3Ls8CENd2Jew/9/XwQHXKB0e72l LFAL/N28ws79aC2W8U9jNW3KD7vm8TegG82D8ZsqHJ8JEy/R8YaYt4N3EdZjDgNMR7hz jIhAPXP9bh1qd5oaAG6ANx34QSBc+meqH/9rHUv2NBIxHFBMoKBMiJ4D/76c870v0IOO IDWb6lfYT1Q7MWpLWJGt68rzs4R9K0XXqRvJ8Y++E+6gVrvIj4dCtiWBdrk0snMnGDKM QAAUt5feh8dG4CPfrtwvTXj40uTh4YmEUubx5XZmMWakQNhrOvJsbVLRNObzE40tdarg UXiQ== X-Received: by 10.68.132.42 with SMTP id or10mr9019839pbb.162.1422479040982; Wed, 28 Jan 2015 13:04:00 -0800 (PST) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id nu5sm5583547pbb.79.2015.01.28.13.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2015 13:04:00 -0800 (PST) Message-ID: <54C94EBF.9060907@gmail.com> Date: Wed, 28 Jan 2015 13:03:59 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andrea Faulds , Matteo Beccati CC: Michael Wallner , PHP Internals References: <54C8D36E.7010803@php.net> <54C9338A.7020202@beccati.com> <54C9363D.6090102@php.net> <54C94A9D.8000904@beccati.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [VOTE] pecl_http From: smalyshev@gmail.com (Stanislav Malyshev) 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 smalyshev@gmail.com