3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_array_assoc(array $arr) { return count(array_filter(array_keys($arr), 'is_string')) > 0; } $arr[1] = 'test'; var_dump(is_array_assoc($arr));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qCTEh
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_DIM                                               !0, 1
          1        OP_DATA                                                  'test'
   11     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'is_array_assoc'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function is_array_assoc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qCTEh
function name:  is_array_assoc
number of ops:  12
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'array_filter'
          2        INIT_FCALL                                               'array_keys'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        SEND_VAL                                                 'is_string'
          7        DO_ICALL                                         $2      
          8        COUNT                                            ~3      $2
          9        IS_SMALLER                                       ~4      0, ~3
         10      > RETURN                                                   ~4
    7    11*     > RETURN                                                   null

End of function is_array_assoc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.22 ms | 1397 KiB | 20 Q