3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array_fill_keys([1.5], 'hello'); $b = [1.5 => 'hello']; var_dump([$a, $b]); var_dump([$a[1.5], $b[1.5]]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gvfc9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_fill_keys'
          1        SEND_VAL                                                 <array>
          2        SEND_VAL                                                 'hello'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        ASSIGN                                                   !1, <array>
    6     6        INIT_FCALL                                               'var_dump'
          7        INIT_ARRAY                                       ~5      !0
          8        ADD_ARRAY_ELEMENT                                ~5      !1
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'var_dump'
         12        FETCH_DIM_R                                      ~7      !0, 1.5
         13        INIT_ARRAY                                       ~8      ~7
         14        FETCH_DIM_R                                      ~9      !1, 1.5
         15        ADD_ARRAY_ELEMENT                                ~8      ~9
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.04 ms | 1394 KiB | 17 Q