Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107703 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16171 invoked from network); 26 Oct 2019 12:57:52 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 26 Oct 2019 12:57:52 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 23D622C0543 for ; Sat, 26 Oct 2019 03:44:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Sat, 26 Oct 2019 03:44:43 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id h5so774995ilh.11 for ; Sat, 26 Oct 2019 03:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zUGCVAJYqFJpR60SwKCLseSpUsVBmSPktbm53h4DU0U=; b=FCU2CHQwy+siaD2lz5rXijMnkwvqAy6AR0OhyPeH0dW1Vzw96rC19a8e1AMn4xNNz6 JGo7RgJ/bLKStXEwwmimlukL8S3EL+mHt8XrQAM+5Zj52C9BCRbL9MhUeSIIyZg+IRrP KY2mcQ40edamAckbXl/NbjBsnaou1yC3HZkU796Tln7UkHCIe4cekfeuhqb5NJkK+A2R 4qEk/TJ9pkCHUB/QYmY8V7Beucr8K6eH39ozXuAt5xVFEloJrZcgi+9Gj4z/eOEUC7Qh 0VQ3Pgk6wn+bZ8prSDHJsF4sZet6qZoQqII6NwCqKSpeZA4g5i2InYpM09jpk3sdqc8e 1Dcg== 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=zUGCVAJYqFJpR60SwKCLseSpUsVBmSPktbm53h4DU0U=; b=aKtO6qtekuEQpX5Q+a3kM7Ze2JrOJPm5bXM9BCZ5sHYJmd1r1WFHl56eP2yxTvMT0F KmLuj+Obc2DQI7j95Xoco0LjFEWJHCy+l4KvPPck9MHuniqfNUbGSvn+Rc6ElgqK5NpJ IuhJGbhVAyNiAj7ieDmows6W6nSegmpZEJnNIwalE6XLdVbqTwZZ/yAiOvvkfwssyyvn +8mldrHtlfqAu5DclVlR5y2kkcHuHZ0yEszkJFsVFoRod/q0S0sN8kFoLj/EzgUoK/WW LgaxA6p0y4TPfIJ/dxKBMLKdouOkXW9bTNu5MVSGQIjx2LTFeYtncG6LnTuaPnR6u5Bl T0jg== X-Gm-Message-State: APjAAAUVIXOvcrYA2t6vb5sjz5psEVFt+Vq2Bi15v36c4cNFeZe9jNDj Jtxr3JQ2/PRKAgiT4RhFN+kOAhVnrG2FRU1nq3g= X-Google-Smtp-Source: APXvYqxMH4Oo4FRXNE73wjhOVrTQbFz4hod9UuKLRUZn0goOP3P7GxL5m6PEDA5vLVWCqAc/gX1jH1TEnY/oI1pEdYA= X-Received: by 2002:a92:d692:: with SMTP id p18mr63946iln.245.1572086683057; Sat, 26 Oct 2019 03:44:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 26 Oct 2019 12:44:32 +0200 Message-ID: To: Peter Bowyer Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000004cc3750595cdf4ea" X-Envelope-From: Subject: Re: [PHP-DEV] Re: [RFC] Union Types v2 From: benjamin.morel@gmail.com (Benjamin Morel) --0000000000004cc3750595cdf4ea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > As they are runtime checks, would an ini setting where they can be > completely disabled be feasible? So during development and in production > when the performance decrease doesn't matter, I can have the full runtime > type checking. But when absolutely needed, the checking can be disabled. Note that I would personally never disable these checks in production, as they may prevent potential bugs down the road, that would not have necessarily been caught in dev. I would rather expect PHP to bring down the cost of these checks in production to a negligible level, as mentioned in my previous message (static analysis and JIT). =E2=80=94 Benjamin On Fri, 25 Oct 2019 at 10:09, Peter Bowyer wrote: > On Thu, 24 Oct 2019 at 13:47, Rowan Tommins > wrote: > > > I think this performance impact is a real concern; PHP is the only > language > > I know of which implements type checks entirely at run-time in producti= on > > code, and we should ask ourselves if that's definitely the right > approach. > > > > As they are runtime checks, would an ini setting where they can be > completely disabled be feasible? So during development and in production > when the performance decrease doesn't matter, I can have the full runtime > type checking. But when absolutely needed, the checking can be disabled. > > Peter > --0000000000004cc3750595cdf4ea--