Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19991 invoked from network); 13 Nov 2015 03:30:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2015 03:30:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:37178] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/C7-62563-C6955465 for ; Thu, 12 Nov 2015 22:30:53 -0500 Received: by wmww144 with SMTP id w144so13364642wmw.0 for ; Thu, 12 Nov 2015 19:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=WFmF75alXAE70+OZ0AjNuQM/sToSYkxm4papJAWuySI=; b=mbbDLvMhKg3cOHGbDHLLILcN0FTEeDMiwJ29t6IBd1TwCz1ArMNd75yygRGeQAErMW VlPq+mjMz2Qvqrm2uXQyh5eUaIoFLVruK9FO7wwuMjWKNLMf+X6+K2lLi/+uVyq/OgmB Vj0c5irVP7b14y3XTDv+pkd15bKr5w6DacA5W6tVS092jvcuhW01NNtB5aZCP29ETluV RXalD1asO55LNMfxgANK/ohPDS/Fzvf2VG/4YcRJRKtiwsWakh0GFFX/rnxWe1BqI+kU XPLywiVrlmGKy3zEp1Txbglf4BR/hDr50Ewl0wsYrgkDYfgqi9JN3s2ubQgZdM/SsTYF klQQ== X-Received: by 10.194.77.174 with SMTP id t14mr19897618wjw.23.1447385450110; Thu, 12 Nov 2015 19:30:50 -0800 (PST) Received: from Stas-Air.local ([87.253.50.253]) by smtp.gmail.com with ESMTPSA id q1sm17608754wjy.31.2015.11.12.19.30.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 19:30:49 -0800 (PST) To: Andrea Faulds , internals@lists.php.net References: <56429DAB.6010005@dasprids.de> Message-ID: <56455965.60101@gmail.com> Date: Fri, 13 Nov 2015 07:30:45 +0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Resource typehint and return type From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > The reason for this is that the resource type is an anachronism from an > age in which PHP did not have objects, yet still needed to make certain > types of data opaque. The resource type is a type that exists only to I think more specific reason is not that resource type is outdated, but that resource is not really a type - it's a collection of types. Mysql connection is a resource, and file is a resource, but they are certainly not interchangeable. So typing a value as "resource" would not achieve you much. -- Stas Malyshev smalyshev@gmail.com