Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118753 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41930 invoked from network); 5 Oct 2022 13:43:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2022 13:43:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0D4481804BA for ; Wed, 5 Oct 2022 06:43:09 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 5 Oct 2022 06:43:08 -0700 (PDT) Received: by mail-ua1-f42.google.com with SMTP id i17so6383990uaq.9 for ; Wed, 05 Oct 2022 06:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=1rnt45nnH9Zwx/GikkR2X/kcLb67njKx1dBOGbiVEJ0=; b=dO/lpxOzPMBUmvxaOPtntqqsuOkPDC5OKgNfX2M2SJy4yArIg6eEWMi/R4XcFgIkQ+ M9cgp5lMQc7z8DaOEhGfbz8iP6mrGkQdL/ormBkrkUlVYDmYoRcviawqpcp/6DbUjbHn NPNaaMAdjha+jC2CtVArEhhGsKG0kssRWXyMT3C7DVwu7JP2rXCo9bza4Rx7k16nbtDi EOTDAqh1H5ATPYYWF7qwDkacJ8ntdXu7KcZm3REKCaokj/RizEaEVD0JNV1hlRSnzs6X oORqVvKA9370Aplk4s9Eo/gSZsHIVR2CUxtCsvoMFsX0u3K6GCI+JQDXPMXMNWF7BqfS JmdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=1rnt45nnH9Zwx/GikkR2X/kcLb67njKx1dBOGbiVEJ0=; b=TJR1W5/CV9WKbHzqXG7YYAXyG4AVKAVOVPx6pXWLqBOROIo6tDt3uYSQ2UMSaUhdxB pp1ub5b50yzU26hMGXmBeKUxX4Y0rJc1r+5n7zEOmUwFw2i5zwkSEQOznlVf6ZhirCcS zU7FxbCj0Q1Xruw++qPfLUwNB4uqlkHeampqmDqXg9kqBBIT+A5M/Pd63kXaJ2oI6Pum K4/QmhDyc+3J7M1m3H8RJ1eMPyrG7mChtgU1Cja2dQG0wbHdV8B3dtd3vh7SaMeJrc82 04vb1vTaU+vdRDlwtEnK5N/NAWbbV/LABIxKD7rBK53vdN11oWX2a+T0x4VScIm09Knh 5CFw== X-Gm-Message-State: ACrzQf1SuE3jtwh0+zmS0awPSJeZEqfuZ088AYVN65LQnzYH/pQZMFgV mOrltYy71MmD1XUyytbY7lGL1H7ltFo0igxEbXQ= X-Google-Smtp-Source: AMsMyM7h9b5/mXZg8sc+nsqMvp5+xekUhPF/vg4wAnQCjuNGJDcb6eJHYTes08STWHPLP1TtVvNdfB22YRjZhgC6bWc= X-Received: by 2002:ab0:3152:0:b0:3d6:5d2:bf43 with SMTP id e18-20020ab03152000000b003d605d2bf43mr11153160uam.10.1664977388076; Wed, 05 Oct 2022 06:43:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 5 Oct 2022 10:42:57 -0300 Message-ID: To: Claude Pache Cc: Eugene Sidelnyk , PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Union type casts From: dev.juan.morales@gmail.com (juan carlos morales) There is a difference is declaring a function parameter of different types ... because before hand, when the code calls the function, we might not be sure about what kind if data the function will receive, so the function could expect different types, and work the parameter correctly internally..... nice but ... when casting, on purpose, what use case can apply to it? Are you facing a situation where manual union type cast is needed? can you share it with us? thanks