Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4074 invoked from network); 11 Aug 2016 10:07:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2016 10:07:30 -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 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:37839] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/41-22587-06E4CA75 for ; Thu, 11 Aug 2016 06:07:29 -0400 Received: by mail-wm0-f45.google.com with SMTP id i5so5022928wmg.0 for ; Thu, 11 Aug 2016 03:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=5aHEK96Ilet2pxKb9Ed2v0Yp7xaPYhbejdMV8XXIU2Y=; b=NnrTl7ydH3IlngdylTr23Fd99BgUJgDNeeqvnqiqVOnjrrpyJk4sv/fx4yWAFTsUkH SiNAE6xrlIptlpYpJt0Bip3bp++8ETd4BFdVgqfQO+9Yrom1Er6fIN678Up9/xHDM/VW 0m87SERyWZiv9uozFZr7haHBivwcRPS4MG2ENnB70TDkz2dxWnKkegqCN8qZP3C/TgIf cM5rHmnRTz94I6uEP+oF8HiScZUiAOO4prxZ+4zO+iLCL+btTsbVCNmymDZxNh7Z5Heh g3DcATzDed5uGvdIU3E3ix6op8nkiL4I9BHebQHq+yOt3TpMq2JYzZi4Gl9cjES8G8P8 4Csw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5aHEK96Ilet2pxKb9Ed2v0Yp7xaPYhbejdMV8XXIU2Y=; b=ZrXZ8ouHsw0SmQExoRJeCeh/XLcE+VAhXh/BjNsD+BtoUAxWAbB3rYdJp0JN30hELW /FtAku3Ot0I4oWGahMEScvw+9EcviOG2nlUNQkl+WCi83Zkq3VS4FLgVDcvfegF7k5jZ +J3S2X5EOMtccW7QpRqXgVP24ut7i+Q64+iYjV4CxkHgAWdhB62UUGl+IPVGbAiYwQon m4vhXGEreCioTWrBEBE3E/iNjBo1uFh9vdhVbVwHQPOmgvI6G+bZVVr8itUoUy6mkJAz U9T6okTYprN7Gu8QzJJJNwioSFYs6hqVJOYNzdUh7sRqQ+Ed7rwm7MEWGJTpbJ0EQiDA lcZA== X-Gm-Message-State: AEkoouv6ch1DUQm1narNG5DN5m3drlCfW53kwCqnjnRqVB3hmKg5Jo/c2vnqvmf3wHtWiw== X-Received: by 10.194.221.232 with SMTP id qh8mr8608669wjc.117.1470910045989; Thu, 11 Aug 2016 03:07:25 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id q139sm12647212wmb.18.2016.08.11.03.07.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 03:07:25 -0700 (PDT) To: internals@lists.php.net References: <9e9c440e-05d2-a452-556e-a6c62a9f195e@gmx.de> <208237ee-a22a-97b7-be63-f7cba986b137@fleshgrinder.com> <16fdbdc7-bad4-f978-32e9-e4bf7443e592@gmx.de> Message-ID: Date: Thu, 11 Aug 2016 11:04:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <16fdbdc7-bad4-f978-32e9-e4bf7443e592@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] GC issue wrt. to resource <-> object cycles? From: rowan.collins@gmail.com (Rowan Collins) On 10/08/2016 19:23, Christoph M. Becker wrote: > That might be a good idea, even if we already have the XMLReader. And > yes, the utf8_* functions don't really belong into ext/xml; frankly, I > think they don't belong anywhere – we already have iconv, mbstring and > recode which offer a subset of utf8_decode()/utf8_encode. OTOH, > utf8_decode()/_encode() appear to be often used (IIRC there are a lot of > user notes suggesting to use these functions). utf8_decode()/utf8_encode are, at best, extremely misleading names. Many uses of them in my experience go something like this: "I have an encoding problem, it's something to do with UTF-8, I'll try utf8_encode; hm, that didn't work, I'll try utf8_decode instead". I hadn't even realised they're in the same extension as the equally misunderstood xml_parse_into_struct() which exposes a somewhat baffling intermediate parsing structure which is incredibly hard to work with. It mostly seems to be used to reinvent event-based parsing, which is already the main facility offered by that extension. (I just looked at the example on the manual page; it's bizarre.) I'm not sure if we need yet another XML parsing extension, or just sign-post that we already have better ones for most tasks. Maybe XMLReader could be expanded to attach callbacks for passed nodes, and have a "readAll" method, so that it acted as an event-based parser? Regards, -- Rowan Collins [IMSoP]