3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1400 KiB | 19 Q