Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60168 invoked from network); 5 Feb 2014 19:30:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2014 19:30:32 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:36850] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/04-38005-75192F25 for ; Wed, 05 Feb 2014 14:30:31 -0500 Received: by mail-wi0-f173.google.com with SMTP id hn9so924037wib.12 for ; Wed, 05 Feb 2014 11:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=1RY08+ZH2BDEWQpATHlTV+M8ep4Ws7dEQastBCtUoz8=; b=l7+oDyTzmqYNmjJwrw7lS3JygcTbW0tq/gH8ZybTTo+zZnhIO6e3O/wxSauLAQ4ub7 5oPHo07krz9Z1CTzNdy7k7zBHQyP+seuiMDuzyVOTmy5R+vxZoUuAGiJK6eL4Er/9sPr /6CTZ/atCOIZ99lH7maqpSLBEAaA0YzMFKp9lDT920gnLG0rcO2bC0qitvVcDnqgikXM fFBoI8Q6vCK7g4uXEmokhMU3Zw3zPvdVcrHvXVXLTTfu3b+RBkQTlIgFnVeWO+AI+lOA WBhOj0JGIxFNyZ81PGM6XAsxWPragGNIW/YulavM0WQHFO6G1596scAjZA6MeuBrFVTG 8gPA== X-Received: by 10.194.87.104 with SMTP id w8mr70175wjz.90.1391628628264; Wed, 05 Feb 2014 11:30:28 -0800 (PST) Received: from [192.168.0.138] ([62.189.198.114]) by mx.google.com with ESMTPSA id n15sm48484793wij.3.2014.02.05.11.30.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 11:30:27 -0800 (PST) Message-ID: <52F29152.3070202@gmail.com> Date: Wed, 05 Feb 2014 19:30:26 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52F00437.7010903@googlemail.com> <52F005E6.6090702@googlemail.com> <52F0D36B.7010905@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [VOTE] __debugInfo() From: rowan.collins@gmail.com (Rowan Collins) Sara Golemon wrote (on 05/02/2014): > (such as current uses in dom, > sxe, mysqli, intl, and spl) If "sxe" in there means SimpleXML, I wish it would do a better job of it! There are countless questions on StackOverflow, and comments in the PHP manual, confused by its mention of "array", "@attributes", etc, and the fact that it omits CDATA nodes, any text node with a non-text sibling, anything in a namespace, etc, etc e.g. http://3v4l.org/h6KeF In fact, now that I know this hook exists, and doesn't affect the action of array casts, I'm tempted to attempt a patch that would improve it, based on the simplexml_tree function I've written at https://github.com/IMSoP/simplexml_debug I guess even if I don't get good enough at C hacking, I could write a version using this new user-land callback :) It's a shame it can't (AIUI) return a completely pre-formatted string, so that complex objects wouldn't have to pretend to contain arrays in order to represent nested properties. -- Rowan Collins [IMSoP]