3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bar = array(); for($j = 0;$j < 100;$j++) { $bar[] = $j; } $bar['k'] = 0; // Only run if array_is_list() isn't available. if ( ! function_exists( 'array_is_list' ) ) { function array_is_list( $arr ) { return array() === $arr || array_values( $arr ) === $arr; } for ( $i = 0; $i < 100; ++$i ) { array_is_list( $bar ); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 24
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 18
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 18
Branch analysis from position: 24
Branch analysis from position: 18
Branch analysis from position: 24
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/o1SSY
function name:  (null)
number of ops:  25
compiled vars:  !0 = $bar, !1 = $j, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    5     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
    4     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 100
          7      > JMPNZ                                                    ~7, ->3
    7     8    >   ASSIGN_DIM                                               !0, 'k'
          9        OP_DATA                                                  0
   10    10        INIT_FCALL                                               'function_exists'
         11        SEND_VAL                                                 'array_is_list'
         12        DO_ICALL                                         $9      
         13        BOOL_NOT                                         ~10     $9
         14      > JMPZ                                                     ~10, ->24
   11    15    >   DECLARE_FUNCTION                                         'array_is_list'
   15    16        ASSIGN                                                   !2, 0
         17      > JMP                                                      ->22
   16    18    >   INIT_FCALL                                               'array_is_list'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   15    21        PRE_INC                                                  !2
         22    >   IS_SMALLER                                               !2, 100
         23      > JMPNZ                                                    ~14, ->18
   18    24    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/o1SSY
function name:  array_is_list
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        IS_IDENTICAL                                     ~1      !0, <array>
          2      > JMPNZ_EX                                         ~1      ~1, ->8
          3    >   INIT_FCALL                                               'array_values'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        IS_IDENTICAL                                     ~3      !0, $2
          7        BOOL                                             ~1      ~3
          8    > > RETURN                                                   ~1
   13     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.53 ms | 1022 KiB | 16 Q