declare example crash on win32

From: Date: Thu, 06 Jun 2002 00:01:26 +0000
Subject: declare example crash on win32
Groups: php.qa 
Request: Send a blank email to php-qa+get-5504@lists.php.net to get a copy of this message
This script from the manual (control structures->declare) crashes win32 using apache... it only seems to crash the child - it keeps generating the crash error every couple of seconds, the server is available for other requests afterwards. using PHP Version 4.3.0-dev System Windows NT localhost 5.0 build 2195 Build Date Apr 26 2002 04:10:45 Server API Apache Virtual Directory Support enabled Configuration File (php.ini) PathC:\WINNT\php.ini Debug Build no Thread Safety enabled PHP Streams enabled Apache 1.3.24 <?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)), "&lt;br&gt;";
    }
} // Display the data stored in the profiler print_r (profile (TRUE)); ?>

« previous php.qa (#5504) next »