3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $some_array = array (0 => 1, 2 => 1, 'a' => 1, 1 => 1, 'z' => 1, 'x' => 1); ksort($some_array); echo(join("", array_keys($some_array))); $some_array = array (0 => 1, 'x' => 1, 2 => 1, 'a' => 1, 1 => 1, 'z' => 1); ksort($some_array); echo(join("", array_keys($some_array)));
based on qSPjH
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/IUuZH
function name:  (null)
number of ops:  25
compiled vars:  !0 = $some_array
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
   4     1        INIT_FCALL                                               'ksort'
         2        SEND_REF                                                 !0
         3        DO_ICALL                                                 
   5     4        INIT_FCALL                                               'join'
         5        SEND_VAL                                                 ''
         6        INIT_FCALL                                               'array_keys'
         7        SEND_VAR                                                 !0
         8        DO_ICALL                                         $3      
         9        SEND_VAR                                                 $3
        10        DO_ICALL                                         $4      
        11        ECHO                                                     $4
   7    12        ASSIGN                                                   !0, <array>
   8    13        INIT_FCALL                                               'ksort'
        14        SEND_REF                                                 !0
        15        DO_ICALL                                                 
   9    16        INIT_FCALL                                               'join'
        17        SEND_VAL                                                 ''
        18        INIT_FCALL                                               'array_keys'
        19        SEND_VAR                                                 !0
        20        DO_ICALL                                         $7      
        21        SEND_VAR                                                 $7
        22        DO_ICALL                                         $8      
        23        ECHO                                                     $8
        24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0