Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17911 invoked from network); 12 Aug 2016 09:30:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 09:30:25 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.20 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.20 mout.gmx.net Received: from [212.227.17.20] ([212.227.17.20:62741] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/E9-56950-0379DA75 for ; Fri, 12 Aug 2016 05:30:25 -0400 Received: from [192.168.2.103] ([79.243.112.54]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LguAU-1atrp41XgE-00oG96; Fri, 12 Aug 2016 11:30:20 +0200 To: Rowan Collins , 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: Fri, 12 Aug 2016 11:30:25 +0200 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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:yigLQjsq8/n5myvUKY+JhAe/CgVaCdSECQTvcQh8BZJqi4mcM94 uZ9fc1Gj9IrpkjsJbFV7rQQg8uuvN1gQGFaBMXDXSg5t8FwFLxGuTmVyLjNQQq6AHB9oGLj XRLRHXM+L2LyEKwNyOjQB7g0Ft1ewXhBYK7hPnn2ksskWrGZgxekZBAwqfPufS/NuDKSmiL NMDzQppVUHeILFQ3i6JMw== X-UI-Out-Filterresults: notjunk:1;V01:K0:WQumugy1chk=:rAQ47jmEobSds1FHx75AZ4 Bl04KTVyoVkNxRQFAcSdeG7VDYu3ZMyM5h6XTni3bf/7pKtsyaOgKZTVOTt57LAH36E1AlLHX UEoNqcIX7XuQ3LFAFfz4VpCziS4CjwSmYsfF7kHogGp1+BLkkox2C/9tgR/eCMkWUJEQvFM46 T3xAFRcU9m+/UVSXsrXTe4Oec+sLFPefjnYqt1Q4JfBp9uGMvxR13FZL//LEytZs/ykpt7rwS HfWEW6BAhUFxrebHAD/pPpymJSdq9vGwexOL7Foqxu1cSFvXfs37IRlJNfag7l+OgtGDmLcXX DYj2Bk2Yc2mxl/kAdnj3YpBLVxHlpNdY1QZ918OIfn05x4OFwXk8cBzG82ZK84palXyAYFSID YP7yNrFW5UkyFwUVhacaGvOACm8QIZFPjrBa/T+MInQr8Va04Fq2lnl8ELEgUupGD/HIu1KGx zN+Rl3bqy5ZYe0Z3ytc6u+v7B2dd68li5/AJnuJx1jfHFVqf6oRfoipLAyGT5Qg3HlvAJg55v 022nbCrX/BautRvkLqN4HhQxu9uTbwHT4XOivlnk9omQKCP1KXBmh3gnl6iBJuVBTXGj//vmJ wuPoeH5NiS6Rp49Fhb3PJWvF3byPJR6scyEIIarTW6Djfre8pTHWp1TLKkDv/mZWqyXagAy59 casZINKaxEGbB4rn12pT2lxsNVk28HAza7QjuFoBYVQBM8+yLrXjx5Fg44pE+O/tiXh8qSzin ZDgO418uXTUSB/HTc7Uc1WHzQCSKAwdkm5F+BdFB8pz7Yl3pQGrEb/juZuYA9E0WTBy/Ccijp 68Zh7lr Subject: Re: [PHP-DEV] GC issue wrt. to resource <-> object cycles? From: cmbecker69@gmx.de ("Christoph M. Becker") On 11.08.2016 at 12:04, Rowan Collins wrote: > 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". You're dead on, AFAICT. > 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.) xml_parse_into_struct() is, in my opinion, also a legacy to better get rid of; we have DOM and SimpleXML for this. > 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? I wouldn't add that to XMLReader, but rather introduce a new abstract class, say SAXParser. I don't mind in which extension this class would exist. -- Christoph M. Becker