3v4l.org

run code in 300+ PHP versions simultaneously
<?php const BACK_OFF_SCALE_FACTOR = 1; function get_back_off_sleep_time(&$int_back_off_multiplier) { if ($int_back_off_multiplier++) { return BACK_OFF_SCALE_FACTOR * pow(2, $int_back_off_multiplier - 1); } return 0; } $foo = 0; for ($i = 0; $i < 10; $i++) { echo get_back_off_sleep_time($foo), "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
Branch analysis from position: 4
filename:       /in/WkhfJ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'BACK_OFF_SCALE_FACTOR', 1
   13     1        ASSIGN                                                   !0, 0
   14     2        ASSIGN                                                   !1, 0
          3      > JMP                                                      ->10
   15     4    >   INIT_FCALL                                               'get_back_off_sleep_time'
          5        SEND_REF                                                 !0
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
          8        ECHO                                                     '%0A'
   14     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 10
         11      > JMPNZ                                                    ~6, ->4
   16    12    > > RETURN                                                   1

Function get_back_off_sleep_time:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WkhfJ
function name:  get_back_off_sleep_time
number of ops:  13
compiled vars:  !0 = $int_back_off_multiplier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        POST_INC                                         ~1      !0
          2      > JMPZ                                                     ~1, ->11
    7     3    >   FETCH_CONSTANT                                   ~2      'BACK_OFF_SCALE_FACTOR'
          4        INIT_FCALL                                               'pow'
          5        SEND_VAL                                                 2
          6        SUB                                              ~3      !0, 1
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                         $4      
          9        MUL                                              ~5      $4, ~2
         10      > RETURN                                                   ~5
   10    11    > > RETURN                                                   0
   11    12*     > RETURN                                                   null

End of function get_back_off_sleep_time

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.05 ms | 1399 KiB | 16 Q