3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(tick=2); function tick_handler() { echo "tick_handler() called\n"; } register_tick_function('tick_handler'); $a = 1; tick_handler(); if ($a > 0) { $a += 2; tick_handler(); print($a); tick_handler(); } tick_handler(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/FkGXI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'register_tick_function'
          1        SEND_VAL                                                 'tick_handler'
          2        DO_ICALL                                                 
    8     3        ASSIGN                                                   !0, 1
    9     4        INIT_FCALL                                               'tick_handler'
          5        DO_FCALL                                      0          
   11     6        IS_SMALLER                                               0, !0
          7      > JMPZ                                                     ~4, ->14
   12     8    >   ASSIGN_OP                                     1          !0, 2
   13     9        INIT_FCALL                                               'tick_handler'
         10        DO_FCALL                                      0          
   14    11        ECHO                                                     !0
   15    12        INIT_FCALL                                               'tick_handler'
         13        DO_FCALL                                      0          
   17    14    >   INIT_FCALL                                               'tick_handler'
         15        DO_FCALL                                      0          
   19    16      > RETURN                                                   1

Function tick_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FkGXI
function name:  tick_handler
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'tick_handler%28%29+called%0A'
    6     1      > RETURN                                                   null

End of function tick_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.03 ms | 1389 KiB | 19 Q