Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105619 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78799 invoked from network); 7 May 2019 15:43:50 -0000 Received: from unknown (HELO mail-yw1-f43.google.com) (209.85.161.43) by pb1.pair.com with SMTP; 7 May 2019 15:43:50 -0000 Received: by mail-yw1-f43.google.com with SMTP id o65so11313706ywd.8 for ; Tue, 07 May 2019 05:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=H8WrTRnYFj3uO6x6aN9B5WjA7OhHnD/BeS9hABwYj/M=; b=e3EXaWRrCvWjfiluWksxFPNlauX9dx8Z0L214uHgPHZSf02PK2tbaZrneB1eiwZb1O 3+g2ezShue4YpZaOsxyOs+E19oVCTLx1br2X25IVogyN5K9HjBVEDoil0Nvd/qADdXOJ Yo0Iv4PWoEdANTwzpDL5nzl1LXHOrixpU1la+m8KjbKYC5J3QaRgc3ldEBVb+52Jp1SQ vV0O025OZu/QxQFHvFEsJwZjwhmbFxyfd1bemYlGBRNT9MpU9Q3WNiiHLCJ/jTEij8U9 1Ol41Hg/ZyKaxaPFQPjMhpZv6Ri7iZ1oi99o3DB6/vyFztgiFN/sJhclkh2fWi5H+fyp wDsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=H8WrTRnYFj3uO6x6aN9B5WjA7OhHnD/BeS9hABwYj/M=; b=ASf4Hr5BAIKq8tNnCOeVY6yRuGRCkdvxcaK5jVT83gZKVcjFYmLIQREfmRwH2+6Rfe vyaGFXvZ0pqE3U7JdSp72rD1k8vS5Roqxw3NWAvIDEHU0MLM0xwOiITbWpzF14E+SRmh X0Pt1r07MxaOkoUWIz3UIrkQLAAgeuUNiOFiA5NwB83UCDjbS28RpRmDpsn4Hu4rmc4+ p9GK0ATkvxVewZhEViyPyggRFPORM8jBDeVHkI5b3haBiNZae7o00TaQNUMNUo2VKB3v 3T3GcRqJ0iv7xzA5/SzsKxuylCHZZj+hvhR35OQSGEIziskWtuq9Prso8K0gzhY0vaOM 2SCA== X-Gm-Message-State: APjAAAWnfnXbVzaTrxithCAQJ/M8OaokpD9y2clGVttXJXfx94f1zxZn 0QGhquL+hVXR+KzttKmcbjs= X-Google-Smtp-Source: APXvYqyHRs+va/HCtOHv1mkPzY3vQfnr/IvPEUTebusG2+xXbVZi9RqeBZwnRormAtgUGP9Uz89soQ== X-Received: by 2002:a81:2e41:: with SMTP id u62mr15720973ywu.28.1557233263376; Tue, 07 May 2019 05:47:43 -0700 (PDT) Received: from [192.168.86.89] (99-63-227-78.lightspeed.gnvlsc.sbcglobal.net. [99.63.227.78]) by smtp.gmail.com with ESMTPSA id w3sm3720534ywc.45.2019.05.07.05.47.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 05:47:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) In-Reply-To: <76C69198-A778-4B60-8EBF-8BDEC7D2DBC1@koalephant.com> Date: Tue, 7 May 2019 08:47:41 -0400 Cc: Nikita Popov , Nicolas Grekas , Marco Pivetta , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: <76C69198-A778-4B60-8EBF-8BDEC7D2DBC1@koalephant.com> To: Stephen Reay X-Mailer: Apple Mail (2.3445.104.8) Subject: Re: [PHP-DEV] Proposal for a RFC From: stevenwadejr@gmail.com (Steven Wade) > Maybe I=E2=80=99m missing the point (I=E2=80=99ve never used it) of = VarDumper, but isn=E2=80=99t this type of thing exactly why the = `__debugInfo` magic method exists? I can't speak for the exact reason a library like VarDumper is using = casting versus __debugInfo, but in trying to find a substitute this = morning, I played with the method you mentioned and found that it can be = overwritten by classes and be commanded to not return anything (similar = to my __toArray proposal), whereas current functionality prevents = overriding casting to an array so casting will always give you insight = but users can overwrite __debugInfo and cause unintended effects. I = assume that's the reason for not using __debugInfo. -- Steven Wade stevenwadejr@gmail.com