3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar1 = []; $ar1[3] = 4; $ar1[2] = 3; $ar1[5] = 6; echo json_encode($ar1) . PHP_EOL; $ar2 = array_fill_keys(range(0, 9), null); $ar2[3] = 4; $ar2[2] = 3; $ar2[5] = 6; echo json_encode($ar2) . PHP_EOL; $ar3 = new \SplFixedArray(10); $ar3[3] = 4; $ar3[2] = 3; $ar3[5] = 6; echo json_encode($ar3) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GXopF
function name:  (null)
number of ops:  48
compiled vars:  !0 = $ar1, !1 = $ar2, !2 = $ar3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 3
          2        OP_DATA                                                  4
          3        ASSIGN_DIM                                               !0, 2
          4        OP_DATA                                                  3
          5        ASSIGN_DIM                                               !0, 5
          6        OP_DATA                                                  6
    5     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        CONCAT                                           ~8      $7, '%0A'
         11        ECHO                                                     ~8
    7    12        INIT_FCALL                                               'array_fill_keys'
         13        INIT_FCALL                                               'range'
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 9
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        SEND_VAL                                                 null
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !1, $10
    8    21        ASSIGN_DIM                                               !1, 3
         22        OP_DATA                                                  4
         23        ASSIGN_DIM                                               !1, 2
         24        OP_DATA                                                  3
         25        ASSIGN_DIM                                               !1, 5
         26        OP_DATA                                                  6
    9    27        INIT_FCALL                                               'json_encode'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                         $15     
         30        CONCAT                                           ~16     $15, '%0A'
         31        ECHO                                                     ~16
   11    32        NEW                                              $17     'SplFixedArray'
         33        SEND_VAL_EX                                              10
         34        DO_FCALL                                      0          
         35        ASSIGN                                                   !2, $17
   12    36        ASSIGN_DIM                                               !2, 3
         37        OP_DATA                                                  4
         38        ASSIGN_DIM                                               !2, 2
         39        OP_DATA                                                  3
         40        ASSIGN_DIM                                               !2, 5
         41        OP_DATA                                                  6
   13    42        INIT_FCALL                                               'json_encode'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $23     
         45        CONCAT                                           ~24     $23, '%0A'
         46        ECHO                                                     ~24
   14    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.7 ms | 1440 KiB | 16 Q