3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'q','w', 'e', 'r' => 'vfbf' ]; function isAssociativeArray($array) { krsort($array, SORT_STRING); return !is_numeric(key($array)); } var_dump(isAssociativeArray($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q2X1g
function name:  (null)
number of ops:  8
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'isassociativearray'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function isassociativearray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q2X1g
function name:  isAssociativeArray
number of ops:  14
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'krsort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 2
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'is_numeric'
          6        INIT_FCALL                                               'key'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                         $3      
         11        BOOL_NOT                                         ~4      $3
         12      > RETURN                                                   ~4
   12    13*     > RETURN                                                   null

End of function isassociativearray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.52 ms | 1398 KiB | 22 Q