Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91995 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18001 invoked from network); 29 Mar 2016 18:57:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Mar 2016 18:57:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=fred@fredemmott.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=fred@fredemmott.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fredemmott.co.uk from 209.85.192.182 cause and error) X-PHP-List-Original-Sender: fred@fredemmott.co.uk X-Host-Fingerprint: 209.85.192.182 mail-pf0-f182.google.com Received: from [209.85.192.182] ([209.85.192.182:36343] helo=mail-pf0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/F4-24137-800DAF65 for ; Tue, 29 Mar 2016 13:57:12 -0500 Received: by mail-pf0-f182.google.com with SMTP id e128so572008pfe.3 for ; Tue, 29 Mar 2016 11:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredemmott-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=/OlpFE1SrC8qMPCDQXh7ZVeNyKyqT3BeIE11luZZV/E=; b=XzOiTbAdkTYZINDHiwO3YjF8Q/FWfd3t9KuuIAVSs1jG+E2GQfc63qQPWkvHLqOS7a baibDlWgNTu6I50OX5isOn1VYeYDoIpr1bjhNxALfnRSj9v4eJAupJVnmM7I4Nwr4bNi WmfoEydL4+rggcx01X0jK/neSP3KLi+Au2aQQTp4dLuuuc37i5mh0vwFQ2TDzVV9x6tk Tj1Ra2B7gA/ylgyeEfQjIRYwB389XOTpA57RRgvhi5AI/aX75uGaD0mj34iYNFSSVee9 kauQ1acAawH8IIbNGIPnVJgISUV8pVUlQfmURNYyhrTgd2LIv7+g0aQhB+XDxFYNLHYX Hfng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=/OlpFE1SrC8qMPCDQXh7ZVeNyKyqT3BeIE11luZZV/E=; b=gve+u2BDzwjwl+4U0QXAjcYyHko0dxHFmnBEbHqwqGzz19Q7AG9YFDhOMRte6j7IXv ZrFj2X98NhAIPvk6hSRMhSjcCgfo57uWKOjicwj0H4kN1QEoD84fiL6VjUGvkg/YYkor f42j/te6M6yp3+x8Hf6ZRl6VUGrvvEcegZaMk607i6NFGPiIdFd7qSFznBdM0Dowi8KG //lJKqz2alqMW4QD19m0Cjrx6OJYaxD7/5GvSg1/FT7TMGNaQj0kjPdivkrHIQk9me0R oImSJHLtyKPdm5cObcEkGJafPFlNw0c1yRKm9zbNFVc11xOHFJj+WCjKiRx9WRPGfUNx ai8w== X-Gm-Message-State: AD7BkJL/R2Yj0PUpiHfK/7dSzufN146tVTkmGEqUf3bH4rtbNaTbQwUbneYKk6iOc90dkg== X-Received: by 10.98.17.132 with SMTP id 4mr6051713pfr.16.1459277829398; Tue, 29 Mar 2016 11:57:09 -0700 (PDT) Received: from ?IPv6:2620:10d:c082:10e2:aa20:66ff:fe45:115c? ([2620:10d:c090:200::fe00]) by smtp.gmail.com with ESMTPSA id 82sm77758pfb.64.2016.03.29.11.57.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Mar 2016 11:57:08 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_488C7270-A786-4D17-9372-794E2D6B03BB" Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Tue, 29 Mar 2016 11:57:07 -0700 Cc: Jesse Schalken , Sara Golemon , PHP internals Message-ID: References: To: Daniel Beardsley X-Mailer: Apple Mail (2.3112) Subject: Re: [PHP-DEV] RFC about automatic template escaping From: fred@fredemmott.co.uk (Fred Emmott) --Apple-Mail=_488C7270-A786-4D17-9372-794E2D6B03BB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi - I=E2=80=99m currently the maintainer of facebook/xhp-lib; as = XHP=E2=80=99s been mentioned a few times here, if someone=E2=80=99s = interested in making a PHP7 version: - while I won=E2=80=99t be able to directly work on a PHP7 port, I=E2=80=99= ll be happy to help in any other way (eg any questions about = design/decisions) - the main branch is Hack-only; the PHP-5 compatible stuff is here: = https://github.com/facebook/xhp-lib/tree/1.x = - = https://github.com/facebookarchive/xhp-php5-extension = =20 - the performance of XHP under HHVM is usually not a practical issue; = it seems likely to be less of an issue under PHP7. A good way to test = could be to desugar some tests to plain PHP = (https://github.com/facebookarchive/xhp-php5-extension/blob/master/xhp/xhp= ize.cpp = ), then run them under PHP5 and PHP7; this way you can measure = without having to port the extension first - there are workarounds for when it is a real issue, eg = https://github.com/hhvm/user-documentation/blob/master/src/site/xhp/APCCac= hedRenderable.php = - here, the performance was an insignificant part of = real requests, but the navigation integration tests were effectively a = worst-case microbenchmark and test run time is important to us. While facebook/xhp-lib must remain Hack because of the nature of it=E2=80=99= s async support, I=E2=80=99d be happy to work with a separate PHP7 = library to avoid avoid any unnecessary differences - hopefully to the = point where we could have a shared =E2=80=98provides=E2=80=99 in = composer. One option would be for the bulk of the files to be transpiled = (HHVM provides =E2=80=98h2tp=E2=80=99 for this), but have core classes = like :x:element written separately to strip out Async stuff. Regards, - Fred > On Mar 20, 2016, at 11:21 PM, Daniel Beardsley = wrote: >=20 >> I agree XHP really is the right solution for this problem. It enables = HTML >> to be created structurally and composably with a concise inline = syntax, just >> like JSX/React does for JavaScript, and just like LINQ does for SQL = in C#. >> It's much better than passing around snippets of HTML as strings that = can >> easily break. >=20 > Yeah, XHP is a great way to go, but it's so different from traditional > templating and is a decent performance penalty that it's hard for = pre-existing > large projects to adopt. >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 --Apple-Mail=_488C7270-A786-4D17-9372-794E2D6B03BB--