@ 2022-02-07T17:01:33Z <?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;
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 8.3.6 0.015 0.000 16.50 8.3.5 0.018 0.004 20.18 8.3.4 0.018 0.003 18.81 8.3.3 0.012 0.003 18.54 8.3.2 0.015 0.000 24.18 8.3.1 0.004 0.004 24.66 8.3.0 0.008 0.000 26.16 8.2.18 0.009 0.006 25.92 8.2.17 0.007 0.007 18.77 8.2.16 0.007 0.007 22.96 8.2.15 0.004 0.004 25.66 8.2.14 0.004 0.004 24.66 8.2.13 0.000 0.008 26.16 8.2.12 0.005 0.002 21.18 8.2.11 0.006 0.003 20.26 8.2.10 0.006 0.003 19.40 8.1.28 0.011 0.004 25.92 8.1.27 0.004 0.004 23.99 8.1.26 0.003 0.005 26.35 8.1.25 0.005 0.003 28.09 8.1.24 0.007 0.003 18.98 8.1.23 0.003 0.007 18.83 8.1.2 0.010 0.007 17.58
preferences:dark mode live preview
30.94 ms | 400 KiB | 5 Q