Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110905 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93187 invoked from network); 9 Jul 2020 19:30:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jul 2020 19:30:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E8528180551 for ; Thu, 9 Jul 2020 11:21:57 -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,FREEMAIL_FROM,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-Virus: No X-Envelope-From: Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (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, 9 Jul 2020 11:21:57 -0700 (PDT) Received: by mail-il1-f171.google.com with SMTP id k6so2859680ili.6 for ; Thu, 09 Jul 2020 11:21:57 -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=yDXWCGX5nMfkTAKVG1usBroGhO0p4LIkefhHYviScZI=; b=YOM3NDpchUFBAeKszIY1FlPvFSPes/ohi6S81l7hyDl26JgD84AiEK2IeGeuFw2cTk VJp57NNOg6g2jA8NcXsWpNmJYIUDjPVM75H471zNiz69sCPfL7QRAdebIUFFrpFO8UtN M3l0euW9X4DcAZu+AmwyhP2KfD9WK9rlkikjUSH2qIgKIeK2o+3+Wc85wMpbIhd4EMVY Dg+c++cXjHGZdrr5ezSC/AB7O0qwDIpE1gqcO9eo0wOCzUy0nRRJD8ZusbCKftyhsj3d zg6jK/iajCzwbizww5mTwr2BEXyynPO33aNnRvErYwlkYmPjq5+gwcXey0WP0A0iaNgO XjYQ== 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=yDXWCGX5nMfkTAKVG1usBroGhO0p4LIkefhHYviScZI=; b=RkWhiNj8gOQml3R8iSbSJvAV8fWzh6XsoMeOXpOy4paH4JeW2PBUtJwXBUejji8CV/ +YwSh5gGX1/bDEcPynzvM6qm4BDcMdlYJGMfh1dJktR9xwAi34Rk7q0Y4c6E5O3xjLuU BGZfQFzIF3TXFjCGtqfLD/YUubz+wBSVIX9w56qyJelsga7tXaHSp4mKAxzsK/+wvp3I 7xzx8ijjxweERv77NSU2uRYA7oJUeFEC2t9E3J3QVkamQ0X4tmb/Nkx7yBpCCQm7duiB Xzp/L2PAwqaDej5fc2QlzsgEz8K6QSuyBCySiy2Ud1Z8rFfEpuo5poTRsdBwIOgobBtR GOcg== X-Gm-Message-State: AOAM531mFZA6F2Xd6fmW+Ty3OKd+zWU2kDqbLXGDSqE0ZF/O1MJAivPf jZFXoAh71NSePdZL4zkDxYNZpGrsYRG9RYAXZLY= X-Google-Smtp-Source: ABdhPJwN58T3gzdbAV6KwqiPboliQKFyFxdBu8b/25whBcXVnTUqchWIjN+V1XVZOjklibaC9WvzqsbJEvPZGeTOW74= X-Received: by 2002:a92:d3c7:: with SMTP id c7mr48816428ilh.292.1594318917025; Thu, 09 Jul 2020 11:21:57 -0700 (PDT) MIME-Version: 1.0 References: <65EE4215-3F80-435C-B271-DBE30D26E2CB@joshbruce.dev> In-Reply-To: Date: Thu, 9 Jul 2020 20:21:45 +0200 Message-ID: To: Marcio Almada Cc: Josh Bruce , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000b5474005aa064c2a" Subject: Re: [PHP-DEV] [CONCEPT][DISCUSSION] Instance as boolean From: ocramius@gmail.com (Marco Pivetta) --000000000000b5474005aa064c2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Marcio, On Thu, Jul 9, 2020 at 7:49 PM Marcio Almada wrote: > Hi > > > > > Re casting - In the previous thread the following concern was presented > and I don=E2=80=99t know enough about that area to respond effectively: "= I'd > endorse avoiding object-to- casts via cast operations: they are a > good source of bugs. My rationale for the discouragement of magic cast > methods is explained with some code examples at > https://github.com/ShittySoft/symfony-live-berlin-2018-doctrine-tutorial/= pull/3#issuecomment-460441229 > =E2=80=9D > > > > Frankly this is something subject to personal opinions and will change > over time according to community shifts. > > Not sure what's "subject to personal opinions" in the objective bug exposed in the snippet above? Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --000000000000b5474005aa064c2a--