3v4l.org

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