Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127699 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id AC91F1A00BC for ; Tue, 17 Jun 2025 21:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750195123; bh=wtaxzEBo7byYNYo/P6cqKKeMIz/IOI6dbkLAmFub90c=; h=Date:From:To:In-Reply-To:References:Subject:From; b=UHxfLqwPvnO4wnGh3nwXkZAh+Ysh/HNEGwMG56u3EsANMqz1U4CDk6HKAKc00KCnF pztSL6n2be7ypPPn/vVvMZ0G9ReE+e3uxQ8o0zDZq5uJHwdVOky+xw4w7x7hI02r6V XMZh9fvxjngRVASoGfr6/IMq8jVbGOIjPD11fXBCiyadWKnaMwZsabxFSt6POpD3vA UNtYpafY+J7bm6z+BSg7oJ8xuLrBBxOzR4ZDpaf+FDcgOfav3ZP9l18+kQuAWOxZrp 3+q6VjGkJUx3qo1hifXjuQ/UnNOcPyPTkFF6S8Zj8YpMEhTUtemh0zXAyBC1ZA5og1 tS+fLdkIylhYA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 34521180042 for ; Tue, 17 Jun 2025 21:18:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 17 Jun 2025 21:18:42 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id B6F121140121 for ; Tue, 17 Jun 2025 17:20:40 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Tue, 17 Jun 2025 17:20:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1750195240; x=1750281640; bh=g2WlNt8hRgyL40JhfYOLR jmMsCAH5E7nUvoGJIF1twk=; b=UdHb/ryjepL19e1CMf8NeQH3kzvy8Scjw9j0m B91xoiE6D/cNGgZrzq+tfBAXxB0p36XuZGU+KrCNulnYZ+dTpWW94koE/kzlISMw C1necmvLbgdYDUaYDaLoKtO3ANsZXqLTAseFOxv/pZHzJAQIT9btecosbWwP1E8w t0NjlADqf6ZOaW9fVDytXLTP/tD1FlxfnDkoW7VuwQyFijMZf60eONaprCTmm+zV Q5FKCR0J7uL8lBEqFgV2N/aAFoVd8lmlq72ZNL11nw9aow3hrQqFixZW5GmilTk8 LzRPthBNuldZEjG493QJK1/ENulkeRQ9ECby1kyBM5gmNGF6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1750195240; x=1750281640; bh=g 2WlNt8hRgyL40JhfYOLRjmMsCAH5E7nUvoGJIF1twk=; b=Z7lqn6kRb+ImVc7PW JlRQEFYJsMSuOFqeVfTCl16wx7oubjljC3g5W5I0F5ykuVyitOLfNUjFweaJZb7Q W0bOIOlEJf1kErCVR2OFgzqfZzZxoMICTMUgLnW+Tb0yYtIgEexrErNINEE0BZ5h nf4C3DOygjIixco+bpU09JFLbcgqqodp0qgOLgpOCd4iKmRxvdtxIdo/KjHTM27v Vqt771MIxH59jW6ar/opovC2Kr1y6zob5f54IPr+fqw6G3RKNMgTehZ5qh/z6V+F aDvUk9V5JjH51G8+yC415vXXwoY7mGZTUTQsU2qqkM1ZyJRLL87+Htz9d9EplD64 CPVNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredttden ucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfih gvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpedugedvlefgueegheefjeet ffduveeltefhfeegjeffffelgedttdevkeegkedugfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggt hhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 108FA700065; Tue, 17 Jun 2025 17:20:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: Tcfa606d0fddd33c0 Date: Tue, 17 Jun 2025 16:20:19 -0500 To: "php internals" Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] Pre-RFC: dd() and dump() functions for PHP core Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jun 17, 2025, at 2:54 PM, Braunson Yager wrote: > Hi internals, > > I'd like to gauge interest in adding two debugging functions to PHP > core: dd() and dump(). > > *Background* > Currently, developers rely on userland solutions like Laravel's dd() > helper or Symfony's VarDumper for enhanced debugging output. These > tools are widely adopted across the PHP ecosystem, suggesting strong > demand for better debugging primitives. > > *Proposal Overview > *- dd($var, ...$vars) - "dump and die" - outputs formatted debug info > and terminates execution > - dump($var, ...$vars) - outputs formatted debug info and continues > execution > > *Enhanced Features Over Existing Solutions > *- Native performance (no userland overhead) > - Stack trace integration > - Memory usage reporting > - Execution timing (potentially) > - Better CLI formatting > > *Why Core vs Userland? > *Similar to how var_dump() provides basic introspection, these > functions would offer enhanced debugging capabilities that benefit the > entire ecosystem, not just framework users. > > *Implementation* > I'm seeking collaboration with an experienced PHP core developer for > the C implementation. I can handle the RFC documentation, testing, etc. > I have experience with the Laravel/Symfony codebases. > > *Before drafting a formal RFC, I'd appreciate feedback on: > *1. General appetite for enhanced debugging functions in core > 2. Concerns about naming conflicts with existing userland helpers > 3. Preferred feature scope > > Thoughts? > > Best regards, > Braunson Yager What exactly would dump() offer that's different/better than var_dump() already does today? Is it just a pretty-printed var_dump()? I don't really see a need for that. --Larry Garfield