Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110886 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26588 invoked from network); 9 Jul 2020 08:14:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jul 2020 08:14:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 987391804B5 for ; Thu, 9 Jul 2020 00:05:38 -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-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 00:05:37 -0700 (PDT) Received: by mail-oi1-f179.google.com with SMTP id t4so1084914oij.9 for ; Thu, 09 Jul 2020 00:05:37 -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=luICR0Nf9mOluMpxpFTfQcetl7KFq0MXKEvZJE5qWLA=; b=gXcuKDGe1d4Srqjns42/M4/tj6t4gidKZQmY0GGjZRPrzCRzCY0mS2otJbaF00+9hy Pb6uhaFJw+TDQvZas+HfGhhWG4ciFx2a+r7gK+7C4r9iS3jA2MLxt1lXDpaZJbg3elvI O9UcQyoPffvGzhuMT7sxu48KG8nM5PDH3IdxzRhu6VDI1NgDKNXKdbu0Ja0b08PzP61H vS/KEzdnrj79Y2SMd6JU6oc4guvyx8218PJxPMoxr64usjwsFFJq34OwRJ5Go6rIoNXt 0IHx/GIP3ikB9O4PhqnMxerBkoSt3Ume7J9savXkZi5l8atrrnldRvNN65uQLQc+2wpe 9Xlg== 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=luICR0Nf9mOluMpxpFTfQcetl7KFq0MXKEvZJE5qWLA=; b=NnvYeL4f/ZPVyIANWaIp6ikCWMgEUv7fyOXeA+jvGyrKP583OXMp+JTD115V2gVt+E noKoelA96ynaaE9ZfPq28V9U9uCs4//rl7OFPmTTn+yJG5MVQYxl2TGeaSd/T5aYCg1F L/fXj4ic/iE/+arF1nc/WHvT9k6PZrBD23rOUYbwUUe39FDQ16sy31b11Zk6aAnDxLy7 8OJyUXghzlIIfMXwRRxQfbnIYr6nomXuzorrOQ2Cpl0K86ZwcrndgS9fV5rpR2OR4WyL z+XdX7sklH+aPWuxso5j8bYjuMlMeJGuCNV2hw6qf6kumuY6/T5X7HiqLjwZ7TpOzS4Y oMjg== X-Gm-Message-State: AOAM53369KPEmlzr56Td8blwAAcyCwXADSDFjbfULjQBghj+eDjsMWVJ tRs7w86TjZV6Daxnd5EGzMVtlUWTu8Klw845Uhk= X-Google-Smtp-Source: ABdhPJyUAJEKS9aYjlf34Ybrb76k4ddDXF/q4VMvBssz2yl6AQfEPdAvBU/YHqcRb3JpryNrFmtPCEjUF+W7In+c9gQ= X-Received: by 2002:aca:3c45:: with SMTP id j66mr9602731oia.101.1594278335315; Thu, 09 Jul 2020 00:05:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 9 Jul 2020 09:05:24 +0200 Message-ID: To: Levi Morrison Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000d9845b05a9fcd9aa" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000d9845b05a9fcd9aa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Levi, =C5=9Br., 8 lip 2020 o 22:25 Levi Morrison napisa=C5=82(a): > Any opposition for a parameter to limit stack depth? It's something > I'd like on the old API too. > I've updated the RFC with the same arguments as in `debug_backtrace()` function. I'm also considering adding a third option for `int $offset =3D 0` in some known cases we want by default skip more frames at the beginning when they're known this would reduce copying values from skipped frames. I've also added two additional properties and related methods: 1) property `?string $object_class =3D null` and method `public function getObjectClass(): ?string` They expose an object class name which is useful in case we don't wanna populate frames with the objects. The additional information could fulfil the https://bugs.php.net/bug.php?id=3D45351 if frames as objects would be got accepted as a replacement in `Exception::getTrace()`. 2) property `?\Closure $closure =3D null` and method `public function getClosure(): ?\Closure` They expose a closure which is useful in case the frame was produced by closure call. This was added to keep the `function` property compatibility with frames produced by `debug_backtrace()`. The additional information could fulfil the https://bugs.php.net/bug.php?id=3D62325 if frames as objects would be got accepted as a replacement in `Exception::getTrace()`. Cheers, -- Micha=C5=82 Marcin Brzuchalski --000000000000d9845b05a9fcd9aa--