3v4l.org

run code in 300+ PHP versions simultaneously
<?php hell: try { echo PHP; echo has; echo barewords; echo kinda; } 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 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 32
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 0
Branch analysis from position: 0
Branch analysis from position: 32
filename:       /in/fOVtL
function name:  (null)
number of ops:  33
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
    6     3        FETCH_CONSTANT                                   ~3      'has'
          4        ECHO                                                     ~3
    7     5        FETCH_CONSTANT                                   ~4      'barewords'
          6        ECHO                                                     ~4
    8     7        FETCH_CONSTANT                                   ~5      'kinda'
          8        ECHO                                                     ~5
          9      > JMP                                                      ->32
    9    10  E > > CATCH                                       last         'Error'
   10    11    >   INIT_FCALL                                               'str_contains'
         12        INIT_METHOD_CALL                                         !0, 'getMessage'
         13        DO_FCALL                                      0  $6      
         14        SEND_VAR                                                 $6
         15        SEND_VAL                                                 'Undefined+constant'
         16        DO_ICALL                                         $7      
         17      > JMPZ                                                     $7, ->32
   11    18    >   INIT_FCALL                                               'substr'
         19        INIT_METHOD_CALL                                         !0, 'getMessage'
         20        DO_FCALL                                      0  $8      
         21        SEND_VAR                                                 $8
         22        SEND_VAL                                                 20
         23        SEND_VAL                                                 -1
         24        DO_ICALL                                         $9      
         25        ASSIGN                                                   !1, $9
   12    26        INIT_FCALL                                               'define'
         27        SEND_VAR                                                 !1
         28        CONCAT                                           ~11     !1, '+'
         29        SEND_VAL                                                 ~11
         30        DO_ICALL                                                 
   13    31      > JMP                                                      ->0
   15    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.21 ms | 1401 KiB | 19 Q