3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { const TEST = 5; public static $arr = array( self::TEST => 'xxxxxxxxxxxx', ); } try { throw new Exception(a::$a[a::TEST], a::TEST); } catch(Exception $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nBbM2
function name:  (null)
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Exception'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_STATIC_PROP_FUNC_ARG   global lock         $2      'a'
          3        FETCH_DIM_FUNC_ARG                               $3      $2, 5
          4        SEND_FUNC_ARG                                            $3
          5        SEND_VAL_EX                                              5
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $1
          8*       JMP                                                      ->13
   11     9  E > > CATCH                                       last         'Exception'
   12    10    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         11        DO_FCALL                                      0  $5      
         12        ECHO                                                     $5
   13    13      > RETURN                                                   1

Class a: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.15 ms | 1393 KiB | 13 Q