3v4l.org

run code in 300+ PHP versions simultaneously
<?php $assoc = array( "a" => 1, "b" => 0, 0 => 0 ); function is_assoc($array){ return !ctype_digit( implode('', array_keys($array)) ); } echo is_assoc($assoc); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gpohm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $assoc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'is_assoc'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   15     5      > RETURN                                                   1

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

End of function is_assoc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.85 ms | 1397 KiB | 20 Q