3v4l.org

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


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/tgUEX
function name:  array_is_list
number of ops:  14
compiled vars:  !0 = $arr, !1 = $i, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, 0
    8     2      > FE_RESET_R                                       $5      !0, ->11
          3    > > FE_FETCH_R                                       ~6      $5, !2, ->11
          4    >   ASSIGN                                                   !3, ~6
    9     5        POST_INC                                         ~8      !1
          6        IS_NOT_IDENTICAL                                         !3, ~8
          7      > JMPZ                                                     ~9, ->10
   10     8    >   FE_FREE                                                  $5
          9      > RETURN                                                   <false>
    8    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $5
   13    12      > RETURN                                                   <true>
   14    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.48 ms | 1432 KiB | 15 Q