3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( NAN ); function array_is_list_1( $arr ) { if ( ( array() === $arr ) ) { return true; } if ( ( array_values( $arr ) === $arr ) ) { return true; } return false; } var_dump(array_values( array( NAN ) ) === array( NAN ) ); // false var_dump( array() === array( NAN ) ); // false var_dump( array_is_list_1( $test ) ); // false on PHP 7.0 and PHP 7.1. true on PHP 7.2+
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nPN8l
function name:  (null)
number of ops:  18
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'array_values'
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $2      
          5        IS_IDENTICAL                                     ~3      $2, <array>
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   20     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAL                                                 <false>
         10        DO_ICALL                                                 
   22    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'array_is_list_1'
         13        SEND_VAR                                                 !0
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

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

End of function array_is_list_1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.79 ms | 1020 KiB | 16 Q