3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors',1); function callMe(){ throw new Exception('I am an exception'); return 'I RETURNED A STRING'; } try { var_dump(callMe()); } catch (\Exception $e){ var_dump($e); } // try uncatched also var_dump(callMe());
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: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gPnHd
function name:  (null)
number of ops:  23
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     30719
          2        DO_ICALL                                                     
    3     3        INIT_FCALL                                                   'ini_set'
          4        SEND_VAL                                                     'display_errors'
          5        SEND_VAL                                                     1
          6        DO_ICALL                                                     
   13     7        INIT_FCALL                                                   'var_dump'
          8        INIT_FCALL                                                   'callme'
          9        DO_FCALL                                          0  $3      
         10        SEND_VAR                                                     $3
         11        DO_ICALL                                                     
         12      > JMP                                                          ->17
   14    13  E > > CATCH                                           last         'Exception'
   15    14    >   INIT_FCALL                                                   'var_dump'
         15        SEND_VAR                                                     !0
         16        DO_ICALL                                                     
   20    17    >   INIT_FCALL                                                   'var_dump'
         18        INIT_FCALL                                                   'callme'
         19        DO_FCALL                                          0  $6      
         20        SEND_VAR                                                     $6
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Function callme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/gPnHd
function name:  callMe
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   NEW                                                  $0      'Exception'
          1        SEND_VAL_EX                                                  'I+am+an+exception'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $0
    8     4*       RETURN                                                       'I+RETURNED+A+STRING'
    9     5*     > RETURN                                                       null

End of function callme

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
223.27 ms | 2189 KiB | 18 Q