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; }

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0150.00016.50
8.3.50.0180.00420.18
8.3.40.0180.00318.81
8.3.30.0120.00318.54
8.3.20.0150.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.170.0070.00718.77
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00221.18
8.2.110.0060.00320.26
8.2.100.0060.00319.40
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0070.00318.98
8.1.230.0030.00718.83
8.1.20.0100.00717.58

preferences:
42.24 ms | 401 KiB | 5 Q