3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Проверка на то, является-ли массив ассоциативным function is_assoc($in_array){ // Для php 5.3 установлено, что сортировка не повлияет // на данные за границами функции ksort($in_array); return !ctype_digit( implode('', array_keys($in_array)) ); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ILfL
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1

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

End of function is_assoc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.61 ms | 1395 KiB | 21 Q