Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php Subject: Re: HP syntax error, unexpected T_variable Date: Tue, 18 Dec 2012 14:11:24 +0100 Lines: 53 Message-ID: References: <1444038.JEF8UCOMkY@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 7GzI8DiPgDVQQTBpU1T7LwDUFG8kkpXZ9OSQXHS4M5/5OUh5jroGgRWM8U59W8PIE= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 In-Reply-To: Xref: csiph.com comp.lang.php:7835 Am 18.12.2012 13:10, schrieb Jerry Stuckle: > On 12/18/2012 6:36 AM, M. Strobel wrote: >> Am 18.12.2012 01:51, schrieb Jerry Stuckle: >>> On 12/17/2012 6:51 PM, Thomas 'PointedEars' Lahn wrote: >>>> Twayne wrote: >>>> >>>>> [=E2=80=A6] >>>>> PHP 5.3.5 on XP Pro SP3+, Apache 2.2 local server. >>>>> >>>>> ------------------------ >>>>> >>>>> >>>> if(isset($_POST['email'])) { >>>>> >>>>> $email_to=3Dme@example.com; >>>> ^ ^ >>>>> /* >>>>> Parse error: syntax error, unexpected T_VARIABLE in >>>>> C:\xampp\htdocs\send.php on line 5 >>>>> */ >>>>> ... >>>>> ?> >>>> ^^ >>>> Superfluous and error-prone at the end of a file. Also, there shoul= d be a >>>> =E2=80=9C}=E2=80=9D before it to end the block of the =E2=80=9Cif=E2= =80=9D statement. >>>> >>> >>> Maybe you consider it superfluous, but GOOD programmer close their co= de at the end. >>> Of course, we know YOU don't. >>> >> >> Zend Framework does not use ?> in PHP only files. Just checked. >> >> /Str. >> >=20 > I rest my case. Just for the many readers, the problem with the closing tag is, that you get difficult to control ne= wlines and spaces in the output. This is hardly noticeable in HTML, but a big problem when serving binary = files. /Str.