Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110678 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60334 invoked from network); 19 Jun 2020 04:31:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jun 2020 04:31:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 145821804F3 for ; Thu, 18 Jun 2020 20:17:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 18 Jun 2020 20:17:09 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id z9so9756246ljh.13 for ; Thu, 18 Jun 2020 20:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rushlow.dev; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WiZXzCyubXHW17WpWFgiQEk1Nt7hg4StUE5RRBkiWpI=; b=Y6dS+ktc6bn5sMIaneYjO5Qd8rmZ5DsdJnYWNL13P4QzGsEg0Qqa/2txbzuvC4Nam4 AfVhOcsEUd2rze8mOtg0LM6zoBERq9kQbp2D1ogL4QguwBDF6JLxKyBBt7i7Lt+hSXaQ eo0PE4HfnujVRS/woQbTblaG0Q5Wy3aZ2tIsHsv22UsrvmN6ebayD69ojknA0I+pGg6O L48HeBBu6ESBKe4B20loRjaMeE3H0JJmHTug4fC2D8FvsxDRi9wsKxIeBUf4jvhak0yl QaaQ7Z9n52gGAEEPLQ0zqvB/PzoHDWtHw+9iiBGeuKgk4axw3OVGmVSg0oxMUXWH7Xfh jpjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WiZXzCyubXHW17WpWFgiQEk1Nt7hg4StUE5RRBkiWpI=; b=Qp+IpfLAnSpDATcwkfjuHXfN6edWl3T6HaWdPpADjmzkGtDqjZVZAHkwA39QteVEd8 VEnV+tUlUQLJIwIQROEWxXJcm3JHZoIf8mXE0pUhITihLufM8M29APSXhLRFA0bChtaR 5T1IcE6QAWFTaCYRUCdWGUomZbDCRRGznsxQJ+zojXhUVEyNmb5AL0EP2x6/9EDp6ORl 6QyCQz5LUTKafnOlVJkICRTpGhaUu2ALzS76tNFg2ae27aXoN8M2oImtTtjUpt1ay6Nn Vsk4UfU0NaBoDNrx54nxv4quTAaySBOKhnevR7vI58oP8/BnxgRgL24WbgrrFsOBfxmB HwFQ== X-Gm-Message-State: AOAM533cDYbudWIoeqXdg1Az1pjxFMovbNsdi8ShqIIXP1omH2ARqhgk PBmVB+EKb3Ke0jzEeN1X27a6VhRxyq2nR4Vmp7A88A== X-Google-Smtp-Source: ABdhPJwi1d1Bqu1mZLB7NrK6xhQqCgt51/1Hx0et6jYFChn/4/1cxC+yZDKIouuLEXC6gxpVJD9kMIjl+8yzZdpVW+c= X-Received: by 2002:a2e:9141:: with SMTP id q1mr696652ljg.196.1592536625155; Thu, 18 Jun 2020 20:17:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 18 Jun 2020 23:17:06 -0400 Message-ID: To: Dan Ackroyd Cc: Gabriel Caruso , PHP Internals Content-Type: multipart/alternative; boundary="000000000000d5a32305a867537f" Subject: Re: [PHP-DEV] Make `always true` SPL methods return void From: jr@rushlow.dev (Jesse Rushlow) --000000000000d5a32305a867537f Content-Type: text/plain; charset="UTF-8" * Disclaimer - I have not thoroughly reviewed the bug report or PR mentioned. From a PHP developers perspective, if I was calling a method that returned true. I would automatically assume that the method is capable of returning the inverse of that as well. I see Dan's point of "let sleeping dogs lie" per say and just adjust the docs. But I'm leaning more towards if a method can't return false & true, then it should return something else or void. Thanks Jesse Rushlow On Wed, Jun 17, 2020 at 6:18 AM Dan Ackroyd wrote: > On Wed, 17 Jun 2020 at 03:00, Gabriel Caruso > wrote: > > > > so changing it to `void` and > > just invoke these methods sounds reasonable to me. > > What's the benefit of doing the change? > > There will almost certainly be some code somewhere that would be > broken by changing it, so it needs some benefit for doing it. > > I strongly suspect just updating the documentation to be correct, and > then leaving the code behaving as it has been for the past decade or > so, would be a better strategy. > > cheers > Dan > Ack > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000d5a32305a867537f--