Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97560 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74069 invoked from network); 7 Jan 2017 17:37:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2017 17:37:08 -0000 Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.44 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.214.44 mail-it0-f44.google.com Received: from [209.85.214.44] ([209.85.214.44:35186] helo=mail-it0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/35-37836-34721785 for ; Sat, 07 Jan 2017 12:37:08 -0500 Received: by mail-it0-f44.google.com with SMTP id c20so31715138itb.0 for ; Sat, 07 Jan 2017 09:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DrsLcrddOO3bbd4wmKgHfIrlpf0IGUBPYKdkYcmDGQ8=; b=HLoqItVPNXytHfgNWXamfSayKu2p5Tr3BuCAK4QBIKjn2sPAxCpzuiS/ILqBNX6sAs 7Hf6tvoOrEFhclWQaNod0OgLvk/xRI07gV42HofNLon+Io8B+ZGxTXRASOdRXio/Mw4B lBkRm/BLXnjRBNez6Vh9/A0XOEJM/6770WN+Q/+Q9ALk5b0NDC6Ad1VVHdngjSSOZrut WSdvg8BVnQn8vJMeXV6x2tIuyZlsOCCHl5DUsVFIZFgfNoSZgU0gjqyWYTqX+azlqEte icwYUEbKLdh9TKxM6/6VSLtulFxASzTeY+6X4UKaWVfEkXtkaKARwbUAgCBm6V/Eg2OK uI4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DrsLcrddOO3bbd4wmKgHfIrlpf0IGUBPYKdkYcmDGQ8=; b=qrfl9rADMlirvNzzrNKcybRAgCoa/r4ydW+MlVTrN2M3W4/Q4IbNcSn28jxir8Gn9R hO56CCv1ENtBWky9RI35YeXiQzfuXurVURqxXiqVby8lM+moEUf36PNlPYZsjBxda2DQ vetRw6w44ZVujXAvYoPiBARwt2F9DLJVTBJ/pnwaE5ZGBkvsItqiU82AxyIvTZFCCHfC ZJoLbag1aW/JZKael7XlRn1vEvwuifIaDrUUbwFl+Hc5ryUqSS+/RsIP0pS8uqiBl0Xn SoEroBYvjt1h4Ma+JMoEkpJdwzlScR3J1aWISn76L298en5fORCK1EI455kQPuIeRvRa f3fA== X-Gm-Message-State: AIkVDXId4YbtjEvM8GWSQ5UM6TWMjqFuKqn4lsw6Lr/5Ih9QmgzQ+8QG99Fxf3vTvGt7nailYImr5h+I82ZZrw== X-Received: by 10.36.0.137 with SMTP id 131mr3399676ita.1.1483810625459; Sat, 07 Jan 2017 09:37:05 -0800 (PST) MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.107.135.72 with HTTP; Sat, 7 Jan 2017 09:37:05 -0800 (PST) In-Reply-To: References: <8e8f1cf4-a698-63b0-71a6-84daff20fdf2@gmail.com> Date: Sat, 7 Jan 2017 18:37:05 +0100 X-Google-Sender-Auth: 8qXZb51hIvjX2YUNwPcFYrV24Po Message-ID: To: Joe Watkins Cc: Rowan Collins , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] SimpleXML's atXPath method From: kalle@php.net (Kalle Sommer Nielsen) 2017-01-07 18:01 GMT+01:00 Joe Watkins : > Evening Rowan, > > I must protest: It is wasteful, unclear, and generally nasty, to create, > return, and manipulate an array if you are only ever going to reference one > element in code. > > It is quite normal to know the structure of a document ahead of time, and > this would allow you to write more succinct and less wasteful code. > > It would appear valuable to me ... I'm not in love with the name of the > thing, but the basic idea appears valuable. I agree, the feature/idea is great. Coming from someone who worked a fair bit with XML recently (I know I know!). Same goes for the method naming, seems a little bit awkward -- regards, Kalle Sommer Nielsen kalle@php.net