3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isAssoc($array) { $array = array_keys($array); var_dump($array, array_keys($array)); return ($array !== array_keys($array)); } var_dump(isAssoc(array(0=>'a',2=>'b',1=>'c')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TW6Uf
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isassoc'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function isassoc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TW6Uf
function name:  isAssoc
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
          5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        INIT_FCALL                                               'array_keys'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
         12        INIT_FCALL                                               'array_keys'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        IS_NOT_IDENTICAL                                 ~6      !0, $5
         16      > RETURN                                                   ~6
    6    17*     > RETURN                                                   null

End of function isassoc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.74 ms | 1398 KiB | 18 Q