3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { new PDO("invalid"); } catch (RuntimeException $e) { $code = $e->getCode(); var_dump($code); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9vu2u
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e, !1 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'PDO'
          1        SEND_VAL_EX                                              'invalid'
          2        DO_FCALL                                      0          
          3        FREE                                                     $2
          4      > JMP                                                      ->12
    5     5  E > > CATCH                                       last         'RuntimeException'
    6     6    >   INIT_METHOD_CALL                                         !0, 'getCode'
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !1, $4
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
    8    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.7 ms | 1405 KiB | 15 Q