|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-10-11 06:42 UTC] rune at strand dot gs
<code> <?php $str = "this is text"; $var = strtok($str); echo ?> </code> I know the code is wrong, but php.exe shouldn't crash. I've got the Standard binary distribution for Win32 running as CGI binary from the standard Apache binary distribution. W2K error message: "php-exe - Application Error The instruction at 0x1004cbb3" referenced memory at 0x5b0a0d0a". The memory could not be 'read'. Click OK to terminate the program" Sorry; no gdb backtrace... Thanks for doing great work! --rune PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
Reproduced with PHP-4.0.6 on Win98. You can even simplify the code: <?php strtok('foo'); ?> The problem is that you may not call strtok the first time without the second argument. If you do, it will crash, no matter what the first argument is. This should really be fixed before 4.0.7 comes out (if it's not already fixed in CVS, I can't test it right now).