Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76785 invoked from network); 24 Oct 2017 09:27:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2017 09:27:17 -0000 Authentication-Results: pb1.pair.com header.from=tpunt@hotmail.co.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tpunt@hotmail.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.co.uk designates 40.92.71.81 as permitted sender) X-PHP-List-Original-Sender: tpunt@hotmail.co.uk X-Host-Fingerprint: 40.92.71.81 mail-oln040092071081.outbound.protection.outlook.com Received: from [40.92.71.81] ([40.92.71.81:61064] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/BF-58908-3770FE95 for ; Tue, 24 Oct 2017 05:27:16 -0400 Received: from DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com (10.152.20.60) by DB5EUR03HT199.eop-EUR03.prod.protection.outlook.com (10.152.21.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.156.4; Tue, 24 Oct 2017 09:27:11 +0000 Received: from AM4PR0901MB1265.eurprd09.prod.outlook.com (10.152.20.56) by DB5EUR03FT044.mail.protection.outlook.com (10.152.21.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.156.4 via Frontend Transport; Tue, 24 Oct 2017 09:27:11 +0000 Received: from AM4PR0901MB1265.eurprd09.prod.outlook.com ([fe80::ed8a:88ab:471a:61c3]) by AM4PR0901MB1265.eurprd09.prod.outlook.com ([fe80::ed8a:88ab:471a:61c3%14]) with mapi id 15.20.0178.004; Tue, 24 Oct 2017 09:27:11 +0000 To: Christopher Jones , PHP Internals Thread-Topic: [PHP-DEV] [RFC] Flexible Heredoc and Nowdoc Syntaxes Thread-Index: AQHTRAW9Yd+8OMxyIE+nYJTWLiuSDaLyOqAAgACMG2c= Date: Tue, 24 Oct 2017 09:27:11 +0000 Message-ID: References: ,<0ac37ce7-62f4-7b1c-5b3d-2d2f45190f07@oracle.com> In-Reply-To: <0ac37ce7-62f4-7b1c-5b3d-2d2f45190f07@oracle.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=none action=none header.from=hotmail.co.uk; x-incomingtopheadermarker: OriginalChecksum:D805260BEB66B75BD53A2FB4736D7C94D3CF37698DC85FE05FB375294C9C389B;UpperCasedChecksum:25B0256E6604741999DDF93C013D21809BDDBF1278F1958229D52F26D85742D9;SizeAsReceived:7192;Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [NeqilND9r3S0bqlfv3E/tVASOzm8RbJv] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB5EUR03HT199;6:OPtVcPfAfERHwXbwW0beWHOcfsDqt/2FSkx8pw+0xwfrLIkb6Auj+YoexPMeXnuTmngQzmsMo68PiYlRf9RT1I3E+k2t5XL7ASS90u8dJ/0E5nM7yghCRM7kZ5Z+Rhpxi0wk+VO86OMos1z8KwnLS6sxRoul1TFw+ZUOiQ6TSB7zFlUAL3PmpTEmBZzEOZMJDHmRRHiakWunxXDEe8O/o8QqZJdJ8dTtNm4EAqkETAp4sHl2xqH2oTG7WBzHDnCRpYOPzDEdNqPiDvRqf+/b4OUsPWMgfBmubTDNBp0RSyJBnq5/UYHqp9AFsUxvpHy4MdgbBaOcjXqc401U6Wx3/w==;5:NKDShEQV1jbRHvxvztWMn3ct1PJKU/gfZYk64wzSZtkoYlop2lQEmPyZNNL6hamIMEwJuPRIbiez+YbWQyrlh1DfOucJixAH1nfQEjMlhrzotCo8HfBNRTCNEHTptwRKLkdCbu9vWQ15J+TAVgcHPQ==;24:lM1OJ3ZnRdRk3iwplBave5f9nXqnzBWHIiO3+QTeA/MiOkC3vbys0x4zhCXdvYg/BCUfeERM7X6Y1MOrsRzKxKpdFRCseburo4YRaSTIsk8=;7:QA1euwLqUcqBynw/cTHbUNtU5sctjKJcC99kcp4TITZvYD711IYP1nxKvpwak9AlQ7+cVGuD1HXpYxADa+1qmzCGY5B/NEamyb9w/Hf3gBB14nPJC9wMMbwPtzBIVy9ukfEZKGE+zT9pzeEjofNIVKiBsf2T3yNx60/f7VWGbXWSRtnU28IOp080YuQR9pcyx/+s24f/DO+Eh3BIGoSsYCOU9dYfAqMQ7TEkzUQI1P4= x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 86ef18d8-ce24-4d07-fe34-08d51ac167fb x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045);SRVR:DB5EUR03HT199; x-ms-traffictypediagnostic: DB5EUR03HT199: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031);SRVR:DB5EUR03HT199;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB5EUR03HT199; x-forefront-prvs: 047001DADA x-forefront-antispam-report: SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:DB5EUR03HT199;H:AM4PR0901MB1265.eurprd09.prod.outlook.com;FPR:;SPF:None;LANG:; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_AM4PR0901MB12657CCAAD6D6A825595E851F9470AM4PR0901MB1265_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86ef18d8-ce24-4d07-fe34-08d51ac167fb X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2017 09:27:11.7121 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT199 Subject: Re: [PHP-DEV] [RFC] Flexible Heredoc and Nowdoc Syntaxes From: tpunt@hotmail.co.uk (Thomas Punt) --_000_AM4PR0901MB12657CCAAD6D6A825595E851F9470AM4PR0901MB1265_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Christopher, > I like the added flexibility in placement of the end token, but I think r= equiring only tabs or spaces, and stripping whitespace from all {here|now}d= oc > lines is error prone and adds unnecessary complexity. I agree that the requirement for using either tabs or spaces is not necessa= ry, but I included it because it does help with readability when looking at the ind= entation level of the heredoc and nowdoc (and subsequently how much whitespace will be stripped from each line). With respect to the stripping of whitespace, h= owever, I feel that this is definitely necessary. If it was not stripped, then inde= nting the closing token and body will cause a lot of whitespace to prepend every line= in the body of text. This is definitely not desirable, and may cause programme= rs to continue to not indent the body of the heredoc/nowdoc, which leads us back = to where we currently are of having indentation of code ruined with such synta= xes. Other languages follow these semantics of stripping whitespace from new lin= es according to the indentation of the closing marker, such as Elixir (normal = """ syntax) and Ruby (special <<~ syntax). Thanks, Tom --_000_AM4PR0901MB12657CCAAD6D6A825595E851F9470AM4PR0901MB1265_--