3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( 'empty array' => array(), 'consecutive from 0' => array( 0 => 'one', 1 => 'two', ), 'consecutive from 0 float' => array( 0.0 => 'one', 1.0 => 'two', ), 'consecutive from 0 str' => array( '0' => 'one', '1' => 'two', ), 'consecutive from 1' => array( 1 => 'one', 2 => 'two', ), 'consecutive from 1 float' => array( 1.0 => 'one', 2.0 => 'two', ), 'consecutive from 1 str' => array( '1' => 'one', '2' => 'two', ), 'non-consecutive int' => array( 1 => 'one', 0 => 'two', ), 'non-consecutive float' => array( 1.0 => 'one', 0.0 => 'two', ), 'non-consecutive string' => array( '1' => 'one', '0' => 'two', ), ); foreach ( $tests as $test => $arr ) { echo str_pad( $test, 30 ), var_export( array_is_list( $arr ), true ), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/agfKh
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tests, !1 = $arr, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   42     1      > FE_RESET_R                                       $4      !0, ->19
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->19
          3    >   ASSIGN                                                   !2, ~5
   43     4        INIT_FCALL                                               'str_pad'
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 30
          7        DO_ICALL                                         $7      
          8        ECHO                                                     $7
          9        INIT_FCALL                                               'var_export'
         10        INIT_FCALL_BY_NAME                                       'array_is_list'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $8      
         13        SEND_VAR                                                 $8
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17        ECHO                                                     '%0A'
   42    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $4
   44    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.01 ms | 1395 KiB | 17 Q