3v4l.org

run code in 300+ PHP versions simultaneously
<?php function inverse($x) { if ($x == 0) { throw new Exception('Division par zéro.'); } return 1/$x; } try { echo inverse(5) . "\n"; echo inverse(0) . "\n"; } catch (Exception $e) { echo 'Exception reçue : ', $e->getMessage(), "\n"; } // Continue execution echo "Bonjour le monde !\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YROrP
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'inverse'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0  $1      
          3        CONCAT                                           ~2      $1, '%0A'
          4        ECHO                                                     ~2
   11     5        INIT_FCALL                                               'inverse'
          6        SEND_VAL                                                 0
          7        DO_FCALL                                      0  $3      
          8        CONCAT                                           ~4      $3, '%0A'
          9        ECHO                                                     ~4
         10      > JMP                                                      ->17
   12    11  E > > CATCH                                       last         'Exception'
   13    12    >   ECHO                                                     'Exception+re%C3%A7ue+%3A+'
         13        INIT_METHOD_CALL                                         !0, 'getMessage'
         14        DO_FCALL                                      0  $5      
         15        ECHO                                                     $5
         16        ECHO                                                     '%0A'
   17    17    >   ECHO                                                     'Bonjour+le+monde+%21%0A'
   18    18      > 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/YROrP
function name:  inverse
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        IS_EQUAL                                                 !0, 0
          2      > JMPZ                                                     ~1, ->7
    4     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'Division+par+z%C3%A9ro.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    6     7    >   DIV                                              ~4      1, !0
          8      > RETURN                                                   ~4
    7     9*     > RETURN                                                   null

End of function inverse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.92 ms | 1390 KiB | 15 Q