Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104689 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14790 invoked from network); 13 Mar 2019 03:24:15 -0000 Received: from unknown (HELO mail.experimentalworks.net) (84.19.169.162) by pb1.pair.com with SMTP; 13 Mar 2019 03:24:15 -0000 Received: from kuechenschabe.fritz.box (ppp-188-174-121-6.dynamic.mnet-online.de [188.174.121.6]) by mail.experimentalworks.net (Postfix) with ESMTPSA id 865CC40EB7; Wed, 13 Mar 2019 01:14:14 +0100 (CET) Message-ID: <1552436054.16816.11.camel@schlueters.de> To: Peter Kokot Cc: Rowan Collins , PHP internals Date: Wed, 13 Mar 2019 01:14:14 +0100 In-Reply-To: References: <1552409865.26232.12.camel@schlueters.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Deprecate short_open_tag ini directive? From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Di, 2019-03-12 at 23:50 +0100, Peter Kokot wrote: >  > > Which would be good - as all those things make writing portable > > code > > harder. > > > >    $ echo '' | php > > > > Is a valid program, which will behave vastly different based on the > > ini > > setting. > > In reality if developer wants to write "portable" and proper PHP > code, no one actually should use these short tags anymore. If they > are still used somewhere as part of some legacy code, they won't work > on majority of PHP installations anymore because the mostly have > these turned off today in the php.ini files. So, the question here is > more why supporting a feature that no one should use anymore... the point is: The program I have shown is valid in both modes. One version is obviously stupid (referring to the constant 'xml' and not doing anything further) but still valid. Being just a developer from down the street I might not have been aware of that and delivered the program to a user who, for whatever reason, had short tags enabled and probably won't see a proper error. If they know there are workarounds ( '?>  is a portable version) but such things are a real pain. Having langage changing based on an ini setting is bad. (ze1 compatibility mode was really really fun in early PHP 5 ... not) johannes