3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bar = array(); for($j = 0;$j < 1000;$j++) { $bar[] = $j; } // 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 < 1000; ++$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 = 13, Position 2 = 22
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
Branch analysis from position: 16
Branch analysis from position: 22
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/1WsAV
function name:  (null)
number of ops:  23
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, 1000
          7      > JMPNZ                                                    ~7, ->3
    9     8    >   INIT_FCALL                                               'function_exists'
          9        SEND_VAL                                                 'array_is_list'
         10        DO_ICALL                                         $8      
         11        BOOL_NOT                                         ~9      $8
         12      > JMPZ                                                     ~9, ->22
   10    13    >   DECLARE_FUNCTION                                         'array_is_list'
   14    14        ASSIGN                                                   !2, 0
         15      > JMP                                                      ->20
   15    16    >   INIT_FCALL                                               'array_is_list'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   14    19        PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, 1000
         21      > JMPNZ                                                    ~13, ->16
   17    22    > > 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/1WsAV
function name:  array_is_list
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     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
   12     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.98 ms | 1022 KiB | 16 Q