Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7835

Re: HP syntax error, unexpected T_variable

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" <sorry_no_mail_here@nowhere.dee>
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 <ajb8btF2f7eU1@mid.uni-berlin.de> (permalink)
References <kanjie$4pm$1@speranza.aioe.org> <1444038.JEF8UCOMkY@PointedEars.de> <kaoenk$9ef$1@dont-email.me> <ajb2pgF16unU1@mid.uni-berlin.de> <kapmf8$bg9$1@dont-email.me>
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 <kapmf8$bg9$1@dont-email.me>
Xref csiph.com comp.lang.php:7835

Show key headers only | View raw


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:
>>>>
>>>>> […]
>>>>>      PHP 5.3.5 on XP Pro SP3+, Apache 2.2 local server.
>>>>>
>>>>> ------------------------
>>>>>
>>>>> <?php
>>>>> if(isset($_POST['email'])) {
>>>>>
>>>>>     $email_to=me@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 should be a
>>>> “}” before it to end the block of the “if” statement.
>>>>
>>>
>>> Maybe you consider it superfluous, but GOOD programmer close their code at the end.
>>> Of course, we know YOU don't.
>>>
>>
>> Zend Framework does not use ?> in PHP only files. Just checked.
>>
>> /Str.
>>
> 
> I rest my case.

Just for the many readers,

the problem with the closing tag is, that you get difficult to control newlines and
spaces in the output.

This is hardly noticeable in HTML, but a big problem when serving binary files.

/Str.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

HP syntax error, unexpected T_variable "Twayne" <nobody@devnull.spamcop.net> - 2012-12-17 12:08 -0500
  Re: HP syntax error, unexpected T_variable "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-17 18:19 +0100
    Re: HP syntax error, unexpected T_variable "Twayne" <nobody@devnull.spamcop.net> - 2012-12-17 12:44 -0500
      Re: HP syntax error, unexpected T_variable Denis McMahon <denismfmcmahon@gmail.com> - 2012-12-17 18:05 +0000
  Re: HP syntax error, unexpected T_variable The Natural Philosopher <tnp@invalid.invalid> - 2012-12-17 17:30 +0000
  Re: HP syntax error, unexpected T_variable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-18 00:51 +0100
    Re: HP syntax error, unexpected T_variable Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-17 19:51 -0500
      Re: HP syntax error, unexpected T_variable "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-18 12:36 +0100
        Re: HP syntax error, unexpected T_variable Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-18 07:10 -0500
          Re: HP syntax error, unexpected T_variable "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-18 14:11 +0100
            Re: HP syntax error, unexpected T_variable Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-18 11:50 -0500
              Re: HP syntax error, unexpected T_variable Adam Harvey <usenet@adamharvey.name> - 2012-12-19 02:02 +0000
                Re: HP syntax error, unexpected T_variable Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-18 21:23 -0500
                Re: HP syntax error, unexpected T_variable "Twayne" <nobody@devnull.spamcop.net> - 2012-12-18 21:41 -0500
    RESOLVED! Re: HP syntax error, unexpected T_variable "Twayne" <nobody@devnull.spamcop.net> - 2012-12-17 20:56 -0500
      Re: RESOLVED! Re: HP syntax error, unexpected T_variable Denis McMahon <denismfmcmahon@gmail.com> - 2012-12-18 17:34 +0000

csiph-web