ID:               42957
 User updated by:  felipensp at gmail dot com
 Reported By:      felipensp at gmail dot com
 Status:           Open
-Bug Type:         Feature/Change Request
+Bug Type:         Unknown/Other Function
 Operating System: Linux
 PHP Version:      5.2.4
 New Comment:

Change category.


Previous Comments:
------------------------------------------------------------------------

[2007-10-13 18:06:37] felipensp at gmail dot com

Description:
------------
The line numbering appear incorrect.

Reproduce code:
---------------
<?php

function test() {
    static $calls = 0;
    
    if ($calls++ < 1) return;
    
    $bt = debug_backtrace();
    printf("(%d)\n", $bt[0]['line']);
}

register_tick_function('test');

declare (ticks=1) {  
    $i = 0;
    $j = 1;
    $i = 0; $j = 1;
    $i = 0; $j = 1;
    // foo   
}

?>

Expected result:
----------------
(16)
(17)
(18)
(18)
(19)
(19)


Actual result:
--------------
(16)
(17)
(17)
(18)
(18)
(20)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42957&edit=1

Reply via email to