Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115500 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30914 invoked from network); 19 Jul 2021 14:53:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jul 2021 14:53:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 291401804C8 for ; Mon, 19 Jul 2021 08:18:58 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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 ; Mon, 19 Jul 2021 08:18:57 -0700 (PDT) Received: by mail-ua1-f44.google.com with SMTP id w6so6935144uaq.4 for ; Mon, 19 Jul 2021 08:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=neJWa7C2Gmsb3MqtMnP39DhzW5eJGfR+JqvNxsD4ybE=; b=TwllEyyn/sJwqQX7u1EwWnisSn3NstBFdPWU+hSY3TYOcdsgYqAhTLelAfR8Y2ZAJ0 GRquBQx3TPm9MhjaWVibfy/j8nQVUmCQLoSA99FE/Pe2wYZ3Soj/35B3YutFOsJFb00k Rwv2JXbvVwOshwijXVbDybCsfZ53sZx8SlrjM+DclCvwQlC0QG1PV/+DWUEIzyv9YdoN Yc3qIwJT/GeFAI5pko5KOPBYPvkPsHTlrkfoUIt59upOmHdWUBjUGNn3YliWhOMWdbPJ d57T9IQtzRB/FyAWaMDQ4Cxl/BXoUNhv8TBZvecmZaMWyBQ6q04TPORabb9BPlnvHeVT zf2A== 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=neJWa7C2Gmsb3MqtMnP39DhzW5eJGfR+JqvNxsD4ybE=; b=Kb/m+2BweO/dxl1AktihB1rjgUMt57Z0VZkl/shjtH/sR/gvi2nkVFOTIbp/mdSMpe dCYsDQz21AQFpmGYyUv6B1qGAqMq9/3F+JrUyD2lwaSozgP4jYhEdvxiqJc5hvGC5CKy R6pWlGV+LAJUvQ3CzYLRgw+d4FZfU1DHqwNS9aa+LhRzeSqlWg6ZjkBE5/kvdZkboCui xLpvBzIFjw/Jy56GXTS99Eas/FOGscCZCxvXnM8dnTXIKnh0jxqvx32v+gAHU2P4mXnO +aVHEEwnyBhorHv1tFsQKjQwXy/Ll3fYPoIeEayGrIGWBvPNJQVumBZBb4+joApgoN0A LGdA== X-Gm-Message-State: AOAM533IAKPKUThg47SDRn9/KG4BFQ3xIBH0nyBW+8yUF+2NXrniStRT EdpvqVAzOTERpCEynW+Gbtr9pBdnProbX9Ddb+enOA== X-Google-Smtp-Source: ABdhPJxLJX/LKf1ZGRmie1ZKgmxiYprhj0O3gYDRIaxKCSpbnSN9Jm+8JbJRH/n7ih16rlFSBR2mNqOb0MTvclCyThE= X-Received: by 2002:a9f:31c8:: with SMTP id w8mr7254546uad.31.1626707934691; Mon, 19 Jul 2021 08:18:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 19 Jul 2021 16:18:43 +0100 Message-ID: To: Bruce Weirdan Cc: PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] intersection types and null for defaults, properties and return types From: Danack@basereality.com (Dan Ackroyd) On Mon, 19 Jul 2021 at 16:15, Bruce Weirdan wrote: > > On Mon, Jul 19, 2021 at 6:09 PM Dan Ackroyd wrote: > > > Prediction number 2: Having a null type in the language will happen > > before PHP 9, which will enable people to have many bike-shedding > > discussions over ?Bar vs Bar|null. > > Hasn't that already happened in 8.0? It seems to work [1] > > [1] https://3v4l.org/EfmJq > Thanks. Wasn't aware/forgot that - but it's still not usable by itself, so is a bit of a hack. https://3v4l.org/LL9UI function f(): null { return null; } Fatal error: Null can not be used as a standalone type in Dan Ack