3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Original essentially does this: $someVar = ''; $someVar['yeahbuddy'] = "huh?"; var_dump($someVar); // Proposed fix that preserves pre-7.1 behavior: $someVar = ''; if ($someVar != '') { $someVar['yeahbuddy'] = "huh?"; } else { $someVar = []; $someVar['yeahbuddy'] = "huh?"; } var_dump($someVar);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Ce9Z
function name:  (null)
number of ops:  19
compiled vars:  !0 = $someVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN_DIM                                               !0, 'yeahbuddy'
          2        OP_DATA                                                  'huh%3F'
    6     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6        ASSIGN                                                   !0, ''
   10     7        IS_NOT_EQUAL                                             !0, ''
          8      > JMPZ                                                     ~5, ->12
   11     9    >   ASSIGN_DIM                                               !0, 'yeahbuddy'
         10        OP_DATA                                                  'huh%3F'
         11      > JMP                                                      ->15
   13    12    >   ASSIGN                                                   !0, <array>
   14    13        ASSIGN_DIM                                               !0, 'yeahbuddy'
         14        OP_DATA                                                  'huh%3F'
   16    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.23 ms | 1395 KiB | 15 Q