3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = array(1, 5, 2.5); $arr = array(); foreach ($str as $s) { $arr[$s][1]['a'] = $s; } echo '<pre>'; var_dump($arr); echo '</pre>'; ksort($arr); echo '<pre>'; var_dump($arr); echo '</pre>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/e2adF
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str, !1 = $arr, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $5      !0, ->9
          3    > > FE_FETCH_R                                               $5, !2, ->9
    6     4    >   FETCH_DIM_W                                      $6      !1, !2
          5        FETCH_DIM_W                                      $7      $6, 1
          6        ASSIGN_DIM                                               $7, 'a'
          7        OP_DATA                                                  !2
    5     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $5
    8    10        ECHO                                                     '%3Cpre%3E'
         11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14        ECHO                                                     '%3C%2Fpre%3E'
    9    15        INIT_FCALL                                               'ksort'
         16        SEND_REF                                                 !1
         17        DO_ICALL                                                 
   10    18        ECHO                                                     '%3Cpre%3E'
         19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22        ECHO                                                     '%3C%2Fpre%3E'
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.24 ms | 1395 KiB | 17 Q