3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.18 ms | 1385 KiB | 15 Q