3v4l.org

run code in 300+ PHP versions simultaneously
<?php $indexArray = ['a', 'b', 'c']; $assocArray = ["0" => 'a', "1" => "b", "2" => 'c']; var_dump(array_values($indexArray)); var_dump(array_values($assocArray)); var_dump(array_keys($assocArray)); if ($assocArray === array_values($assocArray)) { echo "it works"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/vgK0H
function name:  (null)
number of ops:  27
compiled vars:  !0 = $indexArray, !1 = $assocArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'array_values'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'array_values'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'array_keys'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'array_values'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $10     
         23        IS_IDENTICAL                                             !1, $10
         24      > JMPZ                                                     ~11, ->26
   11    25    >   ECHO                                                     'it+works'
   12    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.98 ms | 1387 KiB | 19 Q