Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102742 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83581 invoked from network); 11 Jul 2018 03:37:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2018 03:37:46 -0000 Authentication-Results: pb1.pair.com header.from=walterp@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=walterp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.43 as permitted sender) X-PHP-List-Original-Sender: walterp@gmail.com X-Host-Fingerprint: 209.85.214.43 mail-it0-f43.google.com Received: from [209.85.214.43] ([209.85.214.43:50631] helo=mail-it0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/F0-15421-68B754B5 for ; Tue, 10 Jul 2018 23:37:44 -0400 Received: by mail-it0-f43.google.com with SMTP id w16-v6so1715462ita.0 for ; Tue, 10 Jul 2018 20:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=KraJ8rPqjL9NMVwySADFMXcd/c7lEFZsNcHaoTUC7vM=; b=Ew4PZETqsPdN7jMR3hg5kVd6wWNUvHI3+DFnCfyenGr/5WWBqhfx8ffK2kwtPff/79 BSJkQucK8VFJJLpn+/rWcc/jUc3b56qq1/7cipcYfskwc3gkcQJ2ZOlIAost0W6fI8pV fLaVMkDMgRykkXvtKT+0p9XNlVAiL7aOGKENctm7iPpN0hbEZ+sln94l9P2eZVc7bWko tNBSd48zQDO9+VWCsWgXe6SOM1t5OUUr1FAcrTrgPz9J/wqcB1Zs7o5uU9jgN3Z6B2Dy GEL2D/8q8tvU6Ak9rBS8YTHDN1F9lNZYUnKnq3E/UYWKqz/LcwKNGUnRBxedSxtCsIWe ZGsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=KraJ8rPqjL9NMVwySADFMXcd/c7lEFZsNcHaoTUC7vM=; b=LWWJ65tqdie9+3WVzzsQp8ILb0LK+K1xZ/IgWxHl5hC5gWE9nOAWUsb3WkeWXN1i0S yYVFTAYhopgHlY1sLTJe/MvMGB+oR0ql2xmnf8kMASu9BS6ntdHaDQhgwC9MrQYhpQih WU+3Nx3pC1ssm0PbhBqag6kp1MA2yzpIM9kLk4iCSv/Ed6ncI2Uhmd4eWVptZs1f+FyS +7lGge3ruM2HkR1UL9EmviDeYEox7pFmlZ5FM/4jT0obwcMffHr9dv4v7HZg5wYmFcEO dyLAtk8K14Z/1FSGhB89mJ4KsuRjadkEg+v7R9xhAre2zWDxCZZjI0YgUkpE8XJlnJqH hS3Q== X-Gm-Message-State: APt69E1EviibWZrS+Qxr2ejz4X5LUEakXJjMb28MYzMghIpyy6Xd8vkn iqB2rBmTVqc5YIWEgWJDrv26pxKQI1n75sel5fc= X-Google-Smtp-Source: AAOMgpeKXtbLVIJGD4lofFFf1VXNQytG1Rm6awZdOx4sNS1tqnDUsw4StUYGW0uwk6XojGwEqO5btPAT2SfBo8WPQ60= X-Received: by 2002:a02:49d4:: with SMTP id p81-v6mr23349629jad.81.1531280260127; Tue, 10 Jul 2018 20:37:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:9083:0:0:0:0:0 with HTTP; Tue, 10 Jul 2018 20:37:39 -0700 (PDT) In-Reply-To: <6b6ef6d3-b699-1439-f9bf-acdd713191a5@librelamp.com> References: <6b6ef6d3-b699-1439-f9bf-acdd713191a5@librelamp.com> Date: Tue, 10 Jul 2018 20:37:39 -0700 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="000000000000f4e14e0570b0f7f2" Subject: Re: [PHP-DEV] Unifying logical operators From: walterp@gmail.com (Walter Parker) --000000000000f4e14e0570b0f7f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 10, 2018 at 7:58 PM, Alice Wonder wrote: > On 07/10/2018 07:20 PM, Ryan wrote: > >> On Tue, Jul 10, 2018 at 2:26 AM, Walter Parker wrote= : >> >> >>> That is a matter of style, as I find $a =3D func() or die more clear th= at >>> the version that uses || >>> >>> Not chaining stuff together is a third style. >>> >>> This feels like a Python PEP request. By that I mean that Python wants = to >>> have only one way to do any one task. Perl style is there=E2=80=99s mor= e than one >>> way to do it. >>> >>> PHP has been a mix of these styles. >>> >>> The big question I have is how much PHP code will break due to an >>> enforced >>> style requirement?. >>> >>> >> As I said in the OP, out of the top 30 GitHub repositories (the first pa= ge >> on the API since I couldn't figure out how to get to the second), there >> was >> only one line that would require a change (and it was copy-pasted from t= he >> manual). Obviously there's no way to truly know how many times it's use= d >> in non-public code, but I'll expand my GitHub search and report back som= e >> more solid metrics. >> > > Using github may not be the most reliable method. > > There are 67 Million repositories on GitHub, is picking the top 30 PHP projects a representative sample of PHP use across the Internet? 80% of web servers where the back end language was known had PHP according to a recent survey. Picking 30 popular open source projects might bias the results of what you think is going in PHP usage. Look at what is most popularly used in composer dependencies. > > For example, I know xor is used in PHP Codesniffer which while likely not > often part of deployed code is very often a devel dependency. > > I think phpunit also uses xor and is also very popular. > > I use xor myself but my use is purely hobby (I have a pseudo-RNG written > in PHP that can take any source of data, random or not, and pass it throu= gh > a filter that makes it pass pRNG tests - showing that passing tests doesn= 't > mean a random source is necessarily random enough for cryptography) > > Anyway as I believe you have already conceded, nuking xor would require > many projects used a lot to have to change. > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 The greatest dangers to liberty lurk in insidious encroachment by men of zeal, well-meaning but without understanding. -- Justice Louis D. Brandei= s --000000000000f4e14e0570b0f7f2--