[PHP] Is this a bug?

2008-08-29 Thread Catalin Zamfir Alexandru, DATAGRAM SRL
Hello guys,

I've been stalking on the list for some time. Didn't have
anything to report/talk, until now. I have a code like this, maybe you guys
can reproduce it, with output buffering started:

Echo 'something';

Echo 'another thing';

Echo 'something br /'\;

 

What happens is that ANYTHING that was echo'ed until that \,
will not reach the buffer. Although, this should actually be a Parse Error,
it isn't, it just echoes what was echoed after the god damned \. It took me
two hours to find this typo in the code .

 

Can you guys reproduce the error? I can actually give you a
link to the server where this code runs.



RE: [PHP] Is this a bug?

2008-08-29 Thread Catalin Zamfir Alexandru, DATAGRAM SRL
I'm using a custom ob_handler (it's a MVC framework, we need this handler).
The ironic thing is that, executed once, the error doesn't show. Executed
twice, the error you're talking about shows. Executed 3rd ... the same as
the first execution. And I have my error_reporting to E_ALL. This happens
ONLY on this kind of error, any other type of error gets reported every
time.

Do you have any ideea what this error type is? E_WARNING? Maybe I
missed something ... And, shouldn't this be a parse error? Rather than a
warning?

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:56 AM
To: Catalin Zamfir Alexandru, DATAGRAM SRL
Cc: php-general@lists.php.net
Subject: Re: [PHP] Is this a bug?

On Fri, 2008-08-29 at 10:40 +0300, Catalin Zamfir Alexandru, DATAGRAM
SRL wrote:
 Echo 'something';
 
 Echo 'another thing';
 
 Echo 'something br /'\;

I got the following output in both php5 and php4:

Warning: Unexpected character in input:  '\' (ASCII=92) state=1
in /home/rob/bleh.php on line 7
somethinganother thingsomething br /

You might want to crank up your error reporting.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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


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