|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17283 register_tick_function();
Submitted: 2002-05-16 23:04 UTC Modified: 2002-09-21 02:14 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: sendidmax at yahoo dot com dot cn Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.2.1 OS: win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sendidmax at yahoo dot com dot cn
New email:
PHP Version: OS:


 [2002-05-16 23:04 UTC] sendidmax at yahoo dot com dot cn
PHP as a module in Apache!(Apache1.3.24 + PHP4.2.1)
// 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");//here have a bug,but on win32+PHP4.2.1 no problem!

// Initialize the function before the declare block

// 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));


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 21:43 UTC]
duplicate of 11536

- I assume that this is supposed to indicate that if you keep reloading it, the lists gets longer and longer...

 [2002-08-23 22:25 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-09-21 02:14 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2005-08-10 13:13 UTC] fredrik at demomusic dot nu
Please use this bug-report for this matter:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 21:01:28 2024 UTC