Op 1/14/10 11:37 PM, Kim Madsen schreef:
> Ashley Sheridan wrote on 14/01/2010 23:30:
>>> What is the difference between:
>>> <?
>>> print "hello PHPeople";
>>> and
>>> <?
>>> print "hello PHPeople";
>>> Same shit when I look at it, a sloppy developer is what it is :-)
>>> -- 
>>> Kind regards
>>> Kim Emax - masterminds.dk
>> Plenty of differences, if you include the first one as a file, the
>> whitespace gets sent to the browser because it is not part of the PHP,
>> and so is assumed to be HTML. Once this happens, the headers have been
>> sent, so you can't use different headers in your script.
> Hmm... you could be right. I guess I just never made that mistake :-)

could be right? that implies you don't know and didn't bother to test it.
I'd postulate that is sloppy. In another post you mention your reliance on
your favorite editor - relying blindly on your editor to 'do the right thing'
could also be considered sloppy (no tool is perfect all of the time).

pretty much every php dev has run into the issue of header() calls failing
due to whitespace, it's almost a rite of passage - I'd only call it a mistake
if you don't bother to test your code to the extent that you actually get into
a situation that you put something so obviously broken into a production env.

you mention that you guess as to whether you made the mistake in question, 
a an off the cuff remark and no worth tripping over in it's own right but it 
raise an interest point, namely that only sloppy devs are satified with guess 
diligent devs either know or they don't and when they don't they take the time 
research and test until they feel confident to say that they do know - rather 
probably not very pragmatic, but there you have it nonetheless.

you offer to different pieces of pseudo-code and call them 'the same shit when 
look at it' - again there's an argument to say that's sloppy (in terms of 
reading code)
considering they are not identical in source nor resultant output.

... same shit, different day ... or to put it another way, be very careful what 
post on a techie mailing list - you never know when some pendantic SOB is going 
rip you another 'one' in reply ;-).

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to