3v4l.org

run code in 300+ PHP versions simultaneously
<?php function retry($retries, $fn) { beginning: try { return $fn(); } catch (Exception $e) { if (!--$retries) { throw new FailingTooHardException('', 0, $e); } goto beginning; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/acDDJ
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function retry:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
filename:       /in/acDDJ
function name:  retry
number of ops:  19
compiled vars:  !0 = $retries, !1 = $fn, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2    >   NOP                                                      
    6     3        INIT_DYNAMIC_CALL                                        !1
          4        DO_FCALL                                      0  $3      
          5      > RETURN                                                   $3
          6*       JMP                                                      ->18
    7     7  E > > CATCH                                       last         'Exception'
    8     8    >   PRE_DEC                                          ~4      !0
          9        BOOL_NOT                                         ~5      ~4
         10      > JMPZ                                                     ~5, ->17
    9    11    >   NEW                                              $6      'FailingTooHardException'
         12        SEND_VAL_EX                                              ''
         13        SEND_VAL_EX                                              0
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $6
   11    17    > > JMP                                                      ->2
   13    18*     > RETURN                                                   null

End of function retry

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.78 ms | 1394 KiB | 13 Q