Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127701 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 290611A00BC for ; Tue, 17 Jun 2025 22:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750197770; bh=hNpaZEgbjZqaKaqRmedBkNebcPjsd3ywYX3tv5XNA+c=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Buc0sUmbErjPOoRTa4bl9rQn05CUZOGsfBRtsb8LWWNviaA/l3hHhRs4jDFycuE75 0+jyTT5L8KZoOc9vaqcS5FtoNx9NTTqxIxC3kMKhEzQG+kXiZhVkzzOd/2VqGvDvQO bJ3dA84wlxvjh5DbnzKd8dPWF/k8ml8sFHKsWLIgJYTCGoClm2wItW0kdfFSI4QFEN e+2U5ufw4kbzB3KkGFKEw/AMu7EhyW709hkRKLKlye0raD98nYZdhOXCSggPpzJ4Hf 9ozv5BH70PoY/kt/K4lJRGr0IrneNPAwXlA/OieWBudQJBPV0QNp8j1VuExIRMOtqR MMcCWpJ4rjU1Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 71F60180047 for ; Tue, 17 Jun 2025 22:02:48 +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=-0.1 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_PASS,URIBL_CSS_A 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 filter102.mijn.host (filter102.mijn.host [109.163.225.52]) (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 22:02:48 +0000 (UTC) Received: from h26.mijn.host ([2a03:5180:7:2:f264:726d:beae:1]) by filter102.mijn.host with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uReQ7-00F700-Ip for internals@lists.php.net; Tue, 17 Jun 2025 18:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=jnvsor.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EWhxJ1ah9kfuz/BYr0rMWWDcpZvTire0Zvg4CU2oNNY=; b=ieo0sh7S9nuce0cegJVzeSQkr5 WFfwbW4awaXoGzGiF4fME3k7S2nOv77Eq3rs65H55LZRpZA943hGaYGe2HQJFctl8Rc+PHrVJzUR+ L9jtzIb9dOb3piPoVc8k2bq4eGzu8UGK2h5rNLbYGrfzr9mTIQ8XJ1JfzxdQDE0xocOzfY4MD9aW4 fimdvY6T3lKzQsctDiL5rfSBli5np+KJvaUcgHbNENLI+It360OEzzIpQKe/gkw+5fKx0afaremx4 /CUrJmigaRi+KlVfZlC3EzxvWK3hrWoG7F1hu4cAQa+P/1zxPRZbJQ8bKuZ3CbPKjewAOvjs7s+oz x+qHqM0A==; Received: from 2001-1c00-2a02-0700-cdb9-e9f1-8f07-f0ed.cable.dynamic.v6.ziggo.nl ([2001:1c00:2a02:700:cdb9:e9f1:8f07:f0ed]) by h26.mijn.host with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1uReQ6-00000007HUp-2m7b for internals@lists.php.net; Wed, 18 Jun 2025 00:04:42 +0200 Message-ID: <4b512949-8145-42d4-85ec-9537df58af0c@jnvsor.net> Date: Wed, 18 Jun 2025 00:04:42 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Pre-RFC: dd() and dump() functions for PHP core To: internals@lists.php.net References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AuthUser: jnv@jnvsor.net X-Originating-IP: 2a03:5180:7:2:f264:726d:beae:1 X-mijn.host-Spamfilter-Domain: mijn.host X-mijn.host-Spamfilter-Username: 2a03:5180:7:2:f264:726d:beae:1/112 Authentication-Results: mijn.host; auth=pass smtp.auth=2a03:5180:7:2:f264:726d:beae:1/112@mijn.host X-mijn.host-Spamfilter-Outgoing-Class: unsure X-mijn.host-Spamfilter-Outgoing-Evidence: Combined (0.36) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuXU/cuIuUXE9rkbCwBUa+HFvYPuypeE+u7X dKYEkyUlzyu2SmbhJN1U9FKs8X3+Nt2sdENNz0Ob5Mcg8HV4NYhqYDYiFl9huZCsZDn+LUJsU3Ke U7cpAOi9gFaoMih1jg0EybI1sOftHmSKUCHCvcq0VvcCA1Qa9BGdQX4vJy9/H5JVRKyFCRrxWkR6 oZhlSr1e4jPLVCT/ub3oPUpsAhSpiFKfD1jKgYfH+6S5qDVYoOmeRt7qHd5fQGuXWoplKlc1R6Pa oqS3DNVMIxswrKXj/bkKCxxzY2p31rOYNrhltnzprFRbpFQTOcEGeQOY3IecFR5Yg+xLJYwKSmVR caS8DlT23jFwJQ6bi2K/vxG0KiS3/0aXiE97ptqEFHGJYQ+ePfYw3UQ7nJrbBLDZSC0ytw6G02mD 56KU5N87rMzzQ7J7WH0CrN8od5iC+9lbnYxZ7b+MGaj/PAhfCVdIUv+n31/E3ahF5MMcDI7KdpjQ KTGolAHFX2yRkMh5bYRUFazYjDH+G0kDmDMsD3mmoLWlPZla/rT07rpnmNGb4JCTlRmZu2cicrxa qiqFMmVRKBqtI4g+l6rCWbY0MZcgnbHssPmIWbvlt0j/HTeJtA/MM+ANiFc+umc2qD2Vf6xuvRX5 fiorwKsEiSfwJ/4Ofm4ymC8pd+29emFET+XcyyS/hROD2lnK+Gj1NILbk8K1t4JU8BNeVc59Gnz5 4HdiDwdd0iyuI2/0FGpXLtiMsApY/NZcx1WE4dmNhYvFEzid1TRiz2KrlxFbshev8fZHEoAKERWe KKG4PAQYNyavp7c49C4od+2UnnEoe67Ur5b8AGQOg3+KKE4orq+HIjrJlb+wPgtJHnARPA3P+3L3 unPID4jKFojrvUjjKLsywQkk4epFufiSEO0kX4EWsLQt4F9LZQ3W/hKHV3eTrro6IT8uA8gPyiUm KhXR7tc+p12lC/AlCkSujm58a/xB+XC1kCc6Nk02HBbuEgIBsry+WRySKt40eTXlWiUAYdLmsJdA oPIV4U9dEEkpMT0JEU7WaqdTlh5BrxVREcTzf8/gaNTwJDUmEd/Dw3bSBb7ao08FyxsZHnyEwCWd lQd5X2Hzj3/O X-Report-Abuse-To: spam@filter101.mijn.host X-Complaints-To: abuse@filter101.mijn.host From: jnv@jnvsor.net (Jonathan Vollebregt) On 6/17/25 9:54 PM, Braunson Yager wrote: > I'd like to gauge interest in adding two debugging functions to PHP core: dd() and dump(). Going out of your way to deliberately conflict with two very popular userland function names is a bad idea. > *Enhanced Features Over Existing Solutions > *- Native performance (no userland overhead) > - Stack trace integration > - Memory usage reporting > - Execution timing (potentially) > - Better CLI formatting All of these except the native performance already exist in userland dumpers, and if you're counting xdebug's var_dump implementation then you can scratch off native performance too. > *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. The primary feature of these dumpers isn't "Enhanced debugging capabilities" it's pretty printing in HTML output. Color highlighting and unfolding are nice bonuses but they aren't present in other languages by default either (eg. Rust's Debug trait) Xdebug var-dumper and kint are all framework agnostic (And neither xdebug nor kint even require composer) so I don't understand how the existing solutions "just" benefit framework users. If anything I'd say core PHP already has too many dump functions: print_r and var_dump do essentially the same thing, with minor variations in debug_zval_dump and var_export - Jonathan