3v4l.org

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

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

End of function tick_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.26 ms | 1386 KiB | 15 Q