3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo ($firstname) { if (!$firstname) { throw new \Exception('Division par zéro.'); } } try { }catch (\Exeption $e ) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 1
Branch analysis from position: 1
2 jumps found. (Code = 107) Position 1 = 2, Position 2 = -2
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7EV49
function name:  (null)
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > JMP                                                      ->5
   12     1  E > > CATCH                                       last         'Exeption'
   13     2    >   INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   14     5    > > RETURN                                                   1

Function foo:
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/7EV49
function name:  foo
number of ops:  8
compiled vars:  !0 = $firstname
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+par+z%C3%A9ro.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    8     7    > > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.84 ms | 940 KiB | 16 Q