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/20stR
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 = 16
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
filename:       /in/20stR
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, ->16
    9    10    >   NEW                                              $5      'FailingTooHardException'
         11        SEND_VAL_EX                                              ''
         12        SEND_VAL_EX                                              0
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $5
   11    16    > > JMP                                                      ->2
   13    17*     > RETURN                                                   null

End of function retry

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.85 ms | 1394 KiB | 13 Q