Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114631 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76592 invoked from network); 27 May 2021 10:48:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 May 2021 10:48:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE6021804DF for ; Thu, 27 May 2021 04:00:43 -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=-0.7 required=5.0 tests=BAYES_05,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-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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, 27 May 2021 04:00:40 -0700 (PDT) Received: by mail-qv1-f46.google.com with SMTP id q6so2340806qvb.2 for ; Thu, 27 May 2021 04:00:40 -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; bh=iyOIcVNT9EKmlxbf+hhpS809YVp/aWPZaKgzQLXQJpk=; b=g6UZxcGO9QDSaDL4NAP8UIRR07RPjuFyduAsEESFxl83Gda0vbHK+kJbUDzownl8hv 6lZwuLak/lZzjgDJATSHg0ixYSNhf7+gX7D2zU85JAfyAPtQMEomCH1cIwo+bVTHEYbd dCfnxb/Ee0d9KFDVdNBzVagN9Z/agFttrZX4ffmZPgeraiU1gtom0AeOMWdHzmKnkONl gjhtEdTXUg+45VfWcEOxGG3Qq3qx1J7oLL+exChy5DDhC8B3E5gLtnyl7Fanfa4hLTo0 auVgdR9ewrwGRyauGqgkPAelz0qJdp3vjYU4plG9S/YA6WC0kie+y2w3DZZdHfirStUV w7WA== 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; bh=iyOIcVNT9EKmlxbf+hhpS809YVp/aWPZaKgzQLXQJpk=; b=BgJXlbMicASIsDwlRR4J+jDeYkCDCd8M8Ox2MfRHf26ga4+9smrxsWg/OFXgwJr8U6 t2ezels/8s9pXFmPV8KVef4mkKPfU0ioj7otto6lUh91pgahW8GIeRwa3qvsGC+qACgM I2je5CeOAb4KNSBI+X5ta91EUPz1x4uS+eIc3tL3MJm85wHlJygCXqNzWbD2dfZfZHk4 30JtQtUkfBm68mgVwG4WllNVKOOFPKjFNX0lIBEZbXtiU9tx6+I3WWj1E/nhzSk3GHG7 rsOaiPCOqfozS06Hak8ccwVd/8rq9yiS47NrILOD00iVWaJH7e6nubYjzxnAamqWXw6h wfjw== X-Gm-Message-State: AOAM5339Lx6yC8O9Mb9v/VwY35X5Y8dcTQJB8Eok53U2ykaqFysIgQV0 IZgAsBVeMPAvxUjKgfRzMtKVD/kmaUGLHFFQ8SlkVBSZxZtY/g== X-Google-Smtp-Source: ABdhPJz29tuVgtRqo5h3UmrtC/PoMxil6uPJXU8sc5IRz8EsK6+Vzza/E1L8NpmSVyrp/ebZ9KA5atSQN/ibfaCPq9Q= X-Received: by 2002:a05:6214:19c8:: with SMTP id j8mr3175429qvc.42.1622113239588; Thu, 27 May 2021 04:00:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 27 May 2021 13:00:28 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000006e637005c34dab4f" Subject: Re: [PHP-DEV] Escape \0 in var_dump() output From: harmsmitsdev@gmail.com (Harm Smits) --0000000000006e637005c34dab4f Content-Type: text/plain; charset="UTF-8" Hey, > whether var_dump() should be performing any escaping at all, and if yes Well, since var_dump is essentially for debugging purposes, it makes sense to escape certain characters. Like you mentioned, some IDEs do not print/support null bytes. Hence, I am all for it, as it simplifies debugging in that scenario (which is the main objective). > how much we should be escaping. Just \0, both \0 and \ to avoid ambiguity, or a larger set of control characters? Probably a larger set of control characters as well. As mentioned before, var_dump is for *debugging*, if you can not get full debugging information, it will only lead to headaches and frustrations. Regardless, I do believe we should provide some kind of 'setting' for this in php.ini (like precision for example) just so the user can decide what they want to do. --0000000000006e637005c34dab4f--