3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numeric = ['foo', 'bar', 'qux']; $assoc = ['foo' => 'something', 'bar' => 'else', 'qux' => 'ya']; function isNumericKey(array $array) { return is_numeric(implode(array_keys($array))); } var_dump(isNumericKey($numeric)); var_dump(isNumericKey($assoc));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZlXOt
function name:  (null)
number of ops:  15
compiled vars:  !0 = $numeric, !1 = $assoc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'isnumerickey'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'isnumerickey'
         10        SEND_VAR                                                 !1
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function isnumerickey

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.57 ms | 1398 KiB | 23 Q