Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37146 invoked from network); 20 Jun 2016 15:24:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2016 15:24:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.213.50 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.213.50 mail-vk0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:33936] helo=mail-vk0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/82-16093-7CA08675 for ; Mon, 20 Jun 2016 11:24:56 -0400 Received: by mail-vk0-f50.google.com with SMTP id t129so199978554vka.1 for ; Mon, 20 Jun 2016 08:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BSpn0ZKV0ScioTNOR+h+1/2OHU5NQo2qdBWWeY/y2YM=; b=ilDunid03yC8e4iZRI2JE7wSg0ZpitqTcur3kC72wKa3CzD/R6oaGOBhjCDRV8nt6p exgw1bmuYk3bMru1q30pdElLb7MjyOvhfp/vkOKerdYHyjpcfAeOfWtQAF8P7X1OCj0C Pyviu3tgHDZwAfNszbUtg8+PB2SI14KUf2bhG2KgDkfW/BfM+SznWIFZLN8mQDwN9OSD ts6JtaPhIqbu4yBrvqlSDetHk/FJz2aBiNGM/deughLpxTIrj0MttB16gW5rx05B1RdD W0vcZIueE+GTYDW60ktHIBDi1xWX92YHYINyBBwY3J8WA8HJdwfsu4mt86zMjKpIAP65 fhDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BSpn0ZKV0ScioTNOR+h+1/2OHU5NQo2qdBWWeY/y2YM=; b=hi9wHX2fZ7PVnytEhvFJCTETgBpQPkVbbF7wju39TqAKEeti530VCb6SLE47F5hXmp Bh8XIp1JxVxkpkpikdbunGG1w/xC01FCts1bMYOPriBYzVTIH+5xf6m1Zig0yTiSAXwX id13lawOQKEPi4F3Pb2MFDydyF9vXQOoxa4+ODjy/N22yG/xHdtaQ2jowuT0vN4NZ74C /gaIIDIw1x92Gf6YgsBZz4f4O2BIE++eq6/N5exG3XzU02dktpNCM5fo3MI+ShSCDtpK diShw7i0qOIERKH5gmihG2sQSkmlhN6P7WeCSlF4iWBiPpb6/pkbsCTFTkGukOyl0jX2 ccWw== X-Gm-Message-State: ALyK8tLWzbYuUSHAhOLk+jmNu2rrw2lVAkGg3Gpbmk7mz+BjelXHXEvWhYN7B64KDi5a2VFaUSbJZS2sFgaEcg== X-Received: by 10.159.34.104 with SMTP id 95mr6774276uad.86.1466436293040; Mon, 20 Jun 2016 08:24:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.88.148 with HTTP; Mon, 20 Jun 2016 08:24:50 -0700 (PDT) In-Reply-To: References: <20160617202344.2868F1A80C02@dd1730.kasserver.com> <57665E36.60302@lsces.co.uk> <5766D311.6030503@lsces.co.uk> Date: Mon, 20 Jun 2016 17:24:50 +0200 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] New escaped output operator From: rasmus@mindplay.dk (Rasmus Schultz) >
    > >
  • > >
> > There are three different escape mechanism needed there; if there is a > shorthand for one, do you think it will be more likely or less that people > will get the other two right? I have to agree with that - assigning special syntax to one kind of escape-function gives that function an elevated status, which could easily encourage neglect and oversight. I do wish that we had an obvious, consistently-named set of web-related escape/encode functions for use in plain PHP templates, like html(), attr(), js(), etc... having to type and read htmlspecialchars() and json_encode() while you're trying to visually parse a template is really inconvenient. That's all it is though, inconvenience. Nice to have, not must have. I'd be much more interested in a general solution to the problem of being unable to (or at least strongly demotivated from) using actual namespaced functions in this and many other cases - that's a missing feature and a more general problem, whereas in my opinion an operator or shorter function-names are just a work-around... (and please, nobody say "use a template engine" - I *am* using a template engine, it's called PHP!)