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 ) { return array() === $arr || array_values( $arr ) === $arr; } 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/MLs3Z
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
    5     5    >   DECLARE_FUNCTION                                         'array_is_list'
    9     6        ASSIGN                                                   !0, 0
          7      > JMP                                                      ->12
   10     8    >   INIT_FCALL                                               'array_is_list'
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                                 
    9    11        PRE_INC                                                  !0
         12    >   IS_SMALLER                                               !0, 100000
         13      > JMPNZ                                                    ~6, ->8
   12    14    > > 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/MLs3Z
function name:  array_is_list
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     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
    7     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.81 ms | 1429 KiB | 16 Q