3v4l.org

run code in 300+ PHP versions simultaneously
<?php function retry($retries, callable $fn) { try { return $fn(); } catch (\Exception $e) { if (!$retries) { throw new FailingTooHardException('', 0, $e); } retry($retries - 1, $fn); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T62m7
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: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T62m7
function name:  retry
number of ops:  21
compiled vars:  !0 = $retries, !1 = $fn, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_DYNAMIC_CALL                                        !1
          3        DO_FCALL                                      0  $3      
          4      > RETURN                                                   $3
          5*       JMP                                                      ->20
    7     6  E > > CATCH                                       last         'Exception'
    8     7    >   BOOL_NOT                                         ~4      !0
          8      > JMPZ                                                     ~4, ->15
    9     9    >   NEW                                              $5      'FailingTooHardException'
         10        SEND_VAL_EX                                              ''
         11        SEND_VAL_EX                                              0
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $5
   11    15    >   INIT_FCALL_BY_NAME                                       'retry'
         16        SUB                                              ~7      !0, 1
         17        SEND_VAL_EX                                              ~7
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0          
   13    20      > RETURN                                                   null

End of function retry

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.19 ms | 1394 KiB | 13 Q