Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94645 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4297 invoked from network); 23 Jul 2016 14:44:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2016 14:44:28 -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.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:35673] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/CF-24343-BC283975 for ; Sat, 23 Jul 2016 10:44:28 -0400 Received: by mail-wm0-f44.google.com with SMTP id f65so87363648wmi.0 for ; Sat, 23 Jul 2016 07:44:27 -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=FAmoiVwzodgK0Z+wWalk8HTRr4a2wQBEwHV+mC3Q1CE=; b=Nh6JPODOR5tZNyFH8LMlEpb09ZdNevTM6cCisiZAGOOf08awPN/R3jHD33RoD8DIbE zPAKfgd0Kq155myMVxmOCTsOqAG9D3lvBcVZAQw6VGk/6dRrsRS1Z0+WH7xQrdOtJaOr AfrD6Ap04pAY7283pXREUlnKDTYC0sLDjZXqUu5Xjg86PsxplcBx3tjeev6FRttRW3au /JT9vjgyKZ3G01NhR+aGhPo/PlkSE06Soj4R8wzE/zpDJ/Lqsk7tLHOsDcaXG5vvuL9X KYC1CL30o5rZXuqHjYbCEfyZGtEIH20EBiFsR7OQaa97FRGr4a9gs1jjXb871IjFY3es yhAg== 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=FAmoiVwzodgK0Z+wWalk8HTRr4a2wQBEwHV+mC3Q1CE=; b=mQQ364y5rqYdlltZL4Lc6WnwG5j8SX6j/DUo1PKyVZQDoy100beoIbsMSp3G1cD39l D4pLGJB8epnKQsikALbF90aZ16LwpBZ0L3jDq51q2oc4ciyq5yl/glgCh9ta0ClifJPq YRWMvwkRJR38CUWl+EBu9BMt+spjhwaW7sZzzDsJFcSN9h5Dv7ItS04G0L1P/AjfoJrj 00jx8moPfhg+WTjhwk903O2xjxM6EctsHPSyC6V1EEAipbjnkNOi62Oli4xWriHUXsE5 O7tMPlmCLVdqMIl+ObNcu9TsLZCPj2RVDqUczaJMyeaSLSaPET7K3uNfB4+dXA1p9Gfq UlpA== X-Gm-Message-State: AEkoouvpOCm+bjBPh7de3/YMi9zSNUz+w0riHluVsCOA6V0lcnyt4hLdr7FOaoq4iJLQ2w== X-Received: by 10.194.77.142 with SMTP id s14mr6448041wjw.77.1469285064693; Sat, 23 Jul 2016 07:44:24 -0700 (PDT) Received: from [192.168.1.5] ([95.148.161.240]) by smtp.googlemail.com with ESMTPSA id a2sm17892314wma.2.2016.07.23.07.44.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jul 2016 07:44:24 -0700 (PDT) To: internals@lists.php.net References: <8a39df34-4a23-c496-15f6-20a62d27fc59@gmail.com> Message-ID: Date: Sat, 23 Jul 2016 15:44:23 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] New operator for context-dependent escaping From: rowan.collins@gmail.com (Rowan Collins) On 22/07/2016 19:41, David Rodrigues wrote: > Fifth point: you can't use arguments on each escape to change the mean > of what happen, so I need define each possibility (that could be a > lot). For instance: imagine that I have a escape that does, on > reality, a "clamp" that do a $value bet more than min, and less than > max. It should receives two arguments (min and max) and optional one > (inclusive). Currently I could do it like: 25, true); ?>. How you can do that on your case? I think that's drifting a long way away from the idea of "simple escape syntax", and into "building a templating engine". I don't see any need for this list to concern itself with such a task, because Smarty, and Twig, and many others already exist for that job. "clamp()" is a data transform, but it's not an "escape" in any sense that I can think of. Regards, -- Rowan Collins [IMSoP]