ID: 15267 Updated by: yohgaki Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Reproducible crash Operating System: win 98 PHP Version: 4.1.1 New Comment:
It seems this is fixed. Your script does not crash on my Linux Please reopen if you still have problem with 4.2.0-dev. (It may be win spcific problem?) Previous Comments: ------------------------------------------------------------------------ [2002-01-28 22:44:59] [EMAIL PROTECTED] Apache crashes, burns and dies when i copy and paste the first “declare” example in the php documentation.... dont ask me why it is happening. I am having troubles learning how to use declare and ticks. may be declare or ticks is not causing the problem.... beats the heck out of me. php4.0.6 did the same thing with apache 1.3.20, but when i upgraded to apache 1.3.22, it caused and internal server error. After i updated my php to the current version, apache decided it liked to crash and burn better. It might be good idea to update the documentation to a different example, one that does not crash.... just a thought. I know it might not be possible. The source code is as follows: <pre> <?php // A function that records the time when it is called function profile ($dump = FALSE) { static $profile; // Return the times stored in profile, then erase it if ($dump) { $temp = $profile; unset ($profile); return ($temp); } $profile[] = microtime (); } // Set up a tick handler register_tick_function("profile"); // Initialize the function before the declare block profile (); // Run a block of code, throw a tick every 2nd statement declare (ticks=2) { for ($x = 1; $x < 50; ++$x) { echo similar_text (md5($x), md5($x*$x)), "<br>"; } } // Display the data stored in the profiler print_r (profile (TRUE)); ?> </pre> good luck... Brendan ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15267&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]