3v4l.org

run code in 200+ PHP versions simultaneously
<?php declare(ticks=1); function my_function() { echo print_r(debug_backtrace(), 1) . '<br/>'; } register_tick_function('my_function', true); $t = false; $ar = ['test1' => '111']; var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__); foreach ($ar as $k => $e) { $t = ($k === 'test2'); var_dump('$t==='. var_export($t, 1)); if ($t===false) { continue; } var_dump('this line code is not executed (execute "continue")'); test2(); test3(); // this will handled or .. // test4(); // uncomment this and this will handled (but function not exist) } var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__); function test2() { // this never handled (why? =)) return 1; } function test3() { var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 44
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 44
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/hneib
function name:  (null)
number of ops:  51
compiled vars:  !0 = $t, !1 = $ar, !2 = $e, !3 = $k
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   TICKS                                                    
  10     1        INIT_FCALL                                               'register_tick_function'
         2        SEND_VAL                                                 'my_function'
         3        SEND_VAL                                                 <true>
         4        DO_ICALL                                                 
         5        TICKS                                                    
  12     6        QM_ASSIGN                                                !0
         7        TICKS                                                    
  13     8        QM_ASSIGN                                                !1
         9        TICKS                                                    
  15    10        INIT_FCALL                                               'var_dump'
        11        SEND_VAL                                                 '-%3E+on+%2Fin%2Fhneib%3A15'
        12        DO_ICALL                                                 
        13        TICKS                                                    
  17    14      > FE_RESET_R                                       $8      !1, ->44
        15    > > FE_FETCH_R                                       ~9      $8, !2, ->44
        16    >   QM_ASSIGN                                                !3
  19    17        IS_NOT_IDENTICAL                                 ~11     !3, 'test2'
        18        QM_ASSIGN                                                !0
        19        TICKS                                                    
  21    20        INIT_FCALL                                               'var_dump'
        21        INIT_FCALL                                               'var_export'
        22        SEND_VAR                                                 !0
        23        SEND_VAL                                                 1
        24        DO_ICALL                                         $13     
        25        CONCAT                                           ~14     '%24t%3D%3D%3D', $13
        26        SEND_VAL                                                 ~14
        27        DO_ICALL                                                 
        28        TICKS                                                    
  23    29        IS_NOT_IDENTICAL                                 ~16     !0, <false>
        30      > JMPZ                                                     ~16, ->33
  24    31    > > JMP                                                      ->15
        32*       TICKS                                                    
  27    33    >   INIT_FCALL                                               'var_dump'
        34        SEND_VAL                                                 'this+line+code+is+not+executed+%28execute+%22continue%22%29'
        35        DO_ICALL                                                 
        36        TICKS                                                    
  29    37        INIT_FCALL_BY_NAME                                       'test2'
        38        DO_FCALL                                      0          
        39        TICKS                                                    
  30    40        INIT_FCALL_BY_NAME                                       'test3'
        41        DO_FCALL                                      0          
        42        TICKS                                                    
  17    43      > JMP                                                      ->15
        44    >   FE_FREE                                                  $8
        45        TICKS                                                    
  34    46        INIT_FCALL                                               'var_dump'
        47        SEND_VAL                                                 '-%3E+on+%2Fin%2Fhneib%3A34'
        48        DO_ICALL                                                 
        49        TICKS                                                    
  43    50      > RETURN                                                   1

Function my_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hneib
function name:  my_function
number of ops:  10
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   INIT_FCALL                                               'print_r'
         1        INIT_FCALL                                               'debug_backtrace'
         2        DO_ICALL                                         $0      
         3        SEND_VAR                                                 $0
         4        SEND_VAL                                                 1
         5        DO_ICALL                                         $1      
         6        CONCAT                                           ~2      $1, '%3Cbr%2F%3E'
         7        ASSIGN_OBJ                                               ~2
         8        TICKS                                                    
   8     9      > RETURN                                                   null

End of function my_function

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hneib
function name:  test2
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  38     0  E > > RETURN                                                   1
         1*       TICKS                                                    
  39     2*     > RETURN                                                   null

End of function test2

Function test3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hneib
function name:  test3
number of ops:  5
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  42     0  E >   INIT_FCALL                                               'var_dump'
         1        SEND_VAL                                                 '-%3Etest3+on+%2Fin%2Fhneib%3A42'
         2        DO_ICALL                                                 
         3        TICKS                                                    
  43     4      > RETURN                                                   null

End of function test3

Generated using Vulcan Logic Dumper, using php 7.4.0