3v4l.org

run code in 300+ PHP versions simultaneously
<?php function retry($retries, $fn) { beginning: try { return $fn(); } catch (Exception $e) { if ($retries--) { goto beginning; } throw new FailingTooHardException('', 0, $e); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fiKjD
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 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/fiKjD
function name:  retry
number of ops:  18
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                                                      ->17
    7     7  E > > CATCH                                       last         'Exception'
    8     8    >   POST_DEC                                         ~4      !0
          9      > JMPZ                                                     ~4, ->11
    9    10    > > JMP                                                      ->2
   11    11    >   NEW                                              $5      'FailingTooHardException'
         12        SEND_VAL_EX                                              ''
         13        SEND_VAL_EX                                              0
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $5
   13    17*     > RETURN                                                   null

End of function retry

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.54 ms | 1394 KiB | 13 Q