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


Groups > comp.lang.php > #7848

Re: HP syntax error, unexpected T_variable

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: HP syntax error, unexpected T_variable
Date 2012-12-18 21:23 -0500
Organization A noiseless patient Spider
Message-ID <kar8ei$8t6$1@dont-email.me> (permalink)
References (3 earlier) <ajb2pgF16unU1@mid.uni-berlin.de> <kapmf8$bg9$1@dont-email.me> <ajb8btF2f7eU1@mid.uni-berlin.de> <kaq6sc$ilb$1@dont-email.me> <kar777$24g$1@dont-email.me>

Show all headers | View raw


On 12/18/2012 9:02 PM, Adam Harvey wrote:
> On Tue, 18 Dec 2012 11:50:11 -0500, Jerry Stuckle wrote:
>
>> On 12/18/2012 8:11 AM, M. Strobel wrote:
>>> 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.
>>>
>>>
>>>
>> It is not a problem for good programmers.  They know not to place
>> newline characters after the ?>.  Additionally, if one sneaks in, the
>> error message generated is QUITE clear.
>>
>> And BTW - PHP scripts are NOT "binary files".
>
> Of course not, but consider the case where you're outputting a JPEG image
> from a PHP script: there's not necessarily an obvious error message if
> there's trailing whitespace after a ?> (since PHP doesn't care), but the
> image will still be broken nonetheless.
>
> Most modern PHP coding standards I know of now recommend against the ?>
> for that reason. I personally agree.
>
> Of course, coding standards in general tend to be a bit of a religious
> issue!
>
> Adam
>

Yes, PHP is well known for sloppy programmers - more so than any other 
language around.

As for your jpeg - it's still a simple problem if your error logging is 
set up properly in your development system.  And if your development 
system correctly duplicates your production system, if it works on the 
development system, it will work on the production system.

I have several development systems set up here (for different clients 
who have different needs).  I have never had a problem with code working 
on the development system and not working on the production one.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

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