3v4l.org

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

Function retry:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
Branch analysis from position: 10
Branch analysis from position: 10
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/43tUM
function name:  retry
number of ops:  20
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      > JMP                                                      ->4
    8     3    >   PRE_DEC                                                  !0
    6     4    >   INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0  $4      
          6        BOOL_NOT                                         ~5      $4
          7      > JMPZ_EX                                          ~5      ~5, ->10
          8    >   IS_SMALLER                                       ~6      0, !0
          9        BOOL                                             ~5      ~6
         10    > > JMPNZ                                                    ~5, ->3
         11    > > JMP                                                      ->19
   10    12  E > > CATCH                                       last         'Exception'
   12    13    >   NEW                                              $7      'Exception'
         14        SEND_VAL_EX                                              ''
         15        SEND_VAL_EX                                              0
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0          
         18      > THROW                                         0          $7
   14    19    > > RETURN                                                   null

End of function retry

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.56 ms | 1395 KiB | 13 Q