3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $x = []; $x['1'] = "numeric string"; $x["hello"] = "normal string"; $x['01'] = "fun 1"; $x['5.5'] = "fun 2"; $x[' 1'] = "HA HA"; echo var_export($x, true) . "\n"; foreach ($x as $k => $v) { printf("%s => %s\n", $v, gettype($k)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/KcUKi
function name:  (null)
number of ops:  32
compiled vars:  !0 = $x, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, <array>
    6     4        ASSIGN_DIM                                               !0, 1
          5        OP_DATA                                                  'numeric+string'
    7     6        ASSIGN_DIM                                               !0, 'hello'
          7        OP_DATA                                                  'normal+string'
    8     8        ASSIGN_DIM                                               !0, '01'
          9        OP_DATA                                                  'fun+1'
    9    10        ASSIGN_DIM                                               !0, '5.5'
         11        OP_DATA                                                  'fun+2'
   10    12        ASSIGN_DIM                                               !0, '+1'
         13        OP_DATA                                                  'HA+HA'
   12    14        INIT_FCALL                                               'var_export'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $10     
         18        CONCAT                                           ~11     $10, '%0A'
         19        ECHO                                                     ~11
   14    20      > FE_RESET_R                                       $12     !0, ->30
         21    > > FE_FETCH_R                                       ~13     $12, !1, ->30
         22    >   ASSIGN                                                   !2, ~13
   15    23        INIT_FCALL                                               'printf'
         24        SEND_VAL                                                 '%25s+%3D%3E+%25s%0A'
         25        SEND_VAR                                                 !1
         26        GET_TYPE                                         ~15     !2
         27        SEND_VAL                                                 ~15
         28        DO_ICALL                                                 
   14    29      > JMP                                                      ->21
         30    >   FE_FREE                                                  $12
   16    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.49 ms | 1401 KiB | 19 Q