Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88793 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31160 invoked from network); 14 Oct 2015 22:00:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2015 22:00:36 -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.50 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.50 mail-pa0-f50.google.com Received: from [209.85.220.50] ([209.85.220.50:33730] helo=mail-pa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/B3-33697-380DE165 for ; Wed, 14 Oct 2015 18:00:36 -0400 Received: by pabrc13 with SMTP id rc13so65692890pab.0 for ; Wed, 14 Oct 2015 15:00:32 -0700 (PDT) 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=4vYOVA0OECRyrvljN/9QozOEEw22K3JO25KnhD8o1m8=; b=vkYVGG4VD/GU7Du/ZW+IrdoWfUxxhOBnObAQ6BdLPzpmPeUu/oM/p9dU0+NIOUlPQd nza9X9JpwS9GyZRcVtI88rNd8yzFJ2eddoSlqjH8ldrgfZ/xX5tynelOnTdxOfIA1QWZ tvZCO/+1t/ZntP+1w+tmTM+hVUATez+GrfZorLJoBR5QrQi5evFpKcBVvFwzhMp0c+V/ anglBkHaY374Dmj0HAmhOaX7qKS8D+BSFpwo+R2bqjw/m7znW/DGbmnVeYsKVfxvvFvd zhbOPqGnOsp6RRtB2g2/PcUX4rzKP8SEF5/5Vm604hwe6Bl9i1w6a177e51dc3C+YS7G Wo8w== X-Received: by 10.66.120.237 with SMTP id lf13mr5880410pab.25.1444860032629; Wed, 14 Oct 2015 15:00:32 -0700 (PDT) Received: from [192.168.2.102] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id pf7sm11458782pbc.6.2015.10.14.15.00.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Oct 2015 15:00:31 -0700 (PDT) To: Andrea Faulds , internals@lists.php.net References: <0A.C2.33697.6AECE165@pb1.pair.com> Message-ID: <561ED07E.4060809@gmail.com> Date: Wed, 14 Oct 2015 15:00:30 -0700 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: <0A.C2.33697.6AECE165@pb1.pair.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: =?UTF-8?Q?Re:_[PHP-DEV]_[RFC]_Void_Return_Type_=28v0.2=2c_re=c3=b6p?= =?UTF-8?Q?ening=29?= From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I'm reviving my Void Return Type RFC, this time for PHP 7.1: > > https://wiki.php.net/rfc/void_return_type > > Please read it and tell me your thoughts! I still see no point in this, as every PHP function actually returns something (at least null). So this type would not actually be right and would not reflect what actually is happening. Moreover, I don't see any scenario where some code depends on a function not returning something explicitly (i.e. does not use return value) but function actually returns something explicitly and the calling code breaks. This appears to be impossible, and thus there's no reason to declare a function "void" except purely for documentation purposes. Adding keywords to the language just to document this does not look to me like a good idea. -- Stas Malyshev smalyshev@gmail.com