3v4l.org

run code in 300+ PHP versions simultaneously
<?php $example = array( "ae1" => 1, "ae2" => 3, 0 => 3, 1 => 4, ); ksort($example); echo "Sort By Key:" . PHP_EOL; print_r($example); krsort($example); echo "Reverse Sort By Key:" . PHP_EOL; print_r($example);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvD40
function name:  (null)
number of ops:  16
compiled vars:  !0 = $example
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'ksort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   11     4        ECHO                                                     'Sort+By+Key%3A%0A'
   12     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   13     8        INIT_FCALL                                               'krsort'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
   14    11        ECHO                                                     'Reverse+Sort+By+Key%3A%0A'
   15    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.51 ms | 1394 KiB | 19 Q