3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = []; $x[2] = 'a'; $x[1] = 'b'; $x[0] = 'c'; ksort($x); echo json_encode($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bi28c
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 2
          2        OP_DATA                                                  'a'
    5     3        ASSIGN_DIM                                               !0, 1
          4        OP_DATA                                                  'b'
    6     5        ASSIGN_DIM                                               !0, 0
          6        OP_DATA                                                  'c'
    7     7        INIT_FCALL                                               'ksort'
          8        SEND_REF                                                 !0
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ECHO                                                     $6
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.44 ms | 997 KiB | 15 Q