FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » HP syntax error, unexpected T_variable
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: HP syntax error, unexpected T_variable [message #179916 is a reply to message #179914] Wed, 19 December 2012 02:23 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Gettting values from URL in PHP 5.4
Next Topic: passing values into javascript
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 20:33:24 GMT 2024

Total time taken to generate the page: 0.05277 seconds