3v4l.org

run code in 300+ PHP versions simultaneously
<?php function inverse($x) { if (!$x) { throw new Exception('Division by zero.'); } return 1/$x; } try { echo inverse(0) . "\n"; } finally { echo "Second finally.\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 7, Position 2 = 6
Branch analysis from position: 7
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lah9
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'inverse'
          1        SEND_VAL                                                 0
          2        DO_FCALL                                      0  $1      
          3        CONCAT                                           ~2      $1, '%0A'
          4        ECHO                                                     ~2
   12     5      > FAST_CALL                                                ->7
          6    > > JMP                                                      ->9
   13     7    >   ECHO                                                     'Second+finally.%0A'
          8      > FAST_RET                                                 
   14     9    > > RETURN                                                   1

Function inverse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lah9
function name:  inverse
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BOOL_NOT                                         ~1      !0
          2      > JMPZ                                                     ~1, ->7
    5     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'Division+by+zero.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    7     7    >   DIV                                              ~4      1, !0
          8      > RETURN                                                   ~4
    8     9*     > RETURN                                                   null

End of function inverse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.47 ms | 1398 KiB | 14 Q