3v4l.org

run code in 300+ PHP versions simultaneously
<?php hell: try { echo PHP; } catch (\Error $e) { if (str_contains($e->getMessage(), 'Undefined constant')) { $constValue = substr($e->getMessage(), 20, -1); define($constValue, $constValue); goto hell; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
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
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 25
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 0
Branch analysis from position: 0
Branch analysis from position: 25
filename:       /in/CnViM
function name:  (null)
number of ops:  26
compiled vars:  !0 = $e, !1 = $constValue
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
   5     1        FETCH_CONSTANT                                   ~2      'PHP'
         2        ECHO                                                     ~2
         3      > JMP                                                      ->25
   6     4  E > > CATCH                                       last         'Error'
   7     5    >   INIT_FCALL_BY_NAME                                       'str_contains'
         6        INIT_METHOD_CALL                                         !0, 'getMessage'
         7        DO_FCALL                                      0  $3      
         8        SEND_VAR_NO_REF_EX                                       $3
         9        SEND_VAL_EX                                              'Undefined+constant'
        10        DO_FCALL                                      0  $4      
        11      > JMPZ                                                     $4, ->25
   8    12    >   INIT_FCALL                                               'substr'
        13        INIT_METHOD_CALL                                         !0, 'getMessage'
        14        DO_FCALL                                      0  $5      
        15        SEND_VAR                                                 $5
        16        SEND_VAL                                                 20
        17        SEND_VAL                                                 -1
        18        DO_ICALL                                         $6      
        19        ASSIGN                                                   !1, $6
   9    20        INIT_FCALL                                               'define'
        21        SEND_VAR                                                 !1
        22        SEND_VAR                                                 !1
        23        DO_ICALL                                                 
  10    24      > JMP                                                      ->0
  12    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
14.14 ms | 411 KiB | 7 Q