From:             hos dot endre at axelero dot hu
Operating system: Windows NT
PHP version:      5.0.0b1 (beta1)
PHP Bug Type:     Reproducible crash
Bug description:  tokenizing & syntax highlighting crashes

Description:
------------
Tokenizer function (token_get_all) crashes and Apache is going down
immediately, when a newly introduced __METHOD__ constant have found in the
script. Workx good with __FUNCTION__ constant, now I'm gonna use
__FUNCTION__ in my script, but might be problem one day for others...
I guess the sample code wont crash before PHP5, because if I write
anything else instead of __METHOD__, parser assumes that it's ok! Compiler
handles this constant, so the scripts works well with __METHOD__, but
should be untokenizable for documentation generators. Now I tried syntax
highlighting: same result, as I expected.
By the way: in the sample code I use __METHOD__ out of a method,
originally the problem came up in a method's body.

Reproduce code:
---------------
// I hope you like this - the shortest crasher formula:
highlight_string('<?__METHOD__');

Expected result:
----------------
I expect crash.

Actual result:
--------------
Doctor, what's on?

-- 
Edit bug report at http://bugs.php.net/?id=24550&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24550&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24550&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24550&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24550&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24550&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24550&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24550&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24550&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24550&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24550&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24550&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24550&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24550&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24550&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24550&r=gnused

Reply via email to