3v4l.org

run code in 300+ PHP versions simultaneously
<?php $single_Array = array(); //example array $array = array( array('t1' => 'test1'), array('t2' => 'test2'), array('t3' => 'test3'), array('t4' => 'test4'), array('t5' => 'test5')); $size = sizeof($array); //loop to fill the new single-dimensional array for($count = 0; $count<sizeof($array);$count++) { //take the key of multi-dim array $second_cell = key($array[$count]); //set the value into the new array $single_array[$count] = $array[$count][$second_cell]; } //see the results var_dump($single_array); ?>

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.0120.00618.55
8.3.50.0110.00717.80
8.3.40.0110.00418.84
8.3.30.0100.00718.73
8.3.20.0030.00520.76
8.3.10.0040.00421.78
8.3.00.0000.00817.50
8.2.180.0130.00316.38
8.2.170.0060.00922.96
8.2.160.0090.00922.08
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0030.00526.16
8.2.120.0030.00519.88
8.2.110.0090.00019.16
8.2.100.0100.00717.72
8.2.90.0040.00417.63
8.2.80.0000.00818.79
8.2.70.0040.00417.59
8.2.60.0040.00417.50
8.2.50.0040.00417.55
8.2.40.0090.00019.50
8.2.30.0040.00417.76
8.2.20.0000.00818.18
8.2.10.0040.00718.22
8.2.00.0080.00017.66
8.1.280.0120.00325.92
8.1.270.0000.00724.00
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00319.07
8.1.230.0040.00817.83
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0030.00617.23
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0060.00317.65
8.1.160.0030.00518.93
8.1.150.0040.00418.68
8.1.140.0040.00419.45
8.1.130.0000.00820.13
8.1.120.0000.00717.32
8.1.110.0000.00717.46
8.1.100.0000.00717.42
8.1.90.0000.00717.45
8.1.80.0000.00717.38
8.1.70.0000.00717.35
8.1.60.0040.00417.45
8.1.50.0040.00417.55
8.1.40.0030.00617.54
8.1.30.0060.00317.55
8.1.20.0050.00317.65
8.1.10.0050.00317.46
8.1.00.0060.00317.43
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.26
8.0.270.0000.00817.11
8.0.260.0030.00318.30
8.0.250.0050.00316.86
8.0.240.0030.00316.87
8.0.230.0000.00716.84
8.0.220.0050.00316.79
8.0.210.0000.00716.86
8.0.200.0040.00416.75
8.0.190.0050.00316.79
8.0.180.0000.00816.86
8.0.170.0080.00016.89
8.0.160.0030.00316.96
8.0.150.0030.00316.90
8.0.140.0000.00816.87
8.0.130.0070.00013.31
8.0.120.0000.00816.91
8.0.110.0040.00416.83
8.0.100.0000.00816.72
8.0.90.0040.00416.86
8.0.80.0030.01216.84
8.0.70.0050.00216.98
8.0.60.0030.00516.72
8.0.50.0070.00016.94
8.0.30.0080.00616.93
8.0.20.0110.00817.41
8.0.10.0070.00017.07
8.0.00.0120.00616.72
7.4.330.0000.00615.55
7.4.320.0040.00416.63
7.4.300.0000.00716.55
7.4.290.0000.00716.51
7.4.280.0040.00416.55
7.4.270.0040.00416.49
7.4.260.0000.00816.63
7.4.250.0030.00316.57
7.4.240.0000.00816.43
7.4.230.0070.00016.57
7.4.220.0080.00816.68
7.4.210.0060.01416.59
7.4.200.0000.00716.52
7.4.160.0100.00816.37
7.4.150.0160.00917.40
7.4.140.0100.01017.86
7.4.130.0090.00916.62
7.4.120.0110.00616.47
7.4.110.0200.00316.51
7.4.100.0070.01016.41
7.4.90.0160.00716.49
7.4.80.0150.00616.50
7.4.70.0140.00616.55
7.4.60.0100.01116.32
7.4.50.0070.01116.34
7.4.40.0060.01516.38
7.4.30.0160.00016.32
7.4.00.0080.00714.86
7.3.330.0030.00313.16
7.3.320.0030.00313.05
7.3.310.0050.00216.11
7.3.300.0070.00016.17
7.3.290.0050.00916.36
7.3.280.0070.00816.33
7.3.270.0120.00817.40
7.3.260.0060.01316.28
7.3.250.0150.00616.43
7.3.240.0130.00316.44
7.3.230.0140.00416.33
7.3.210.0070.01016.67
7.3.200.0110.01219.39
7.3.190.0140.00716.22
7.3.180.0070.01416.59
7.3.170.0080.01116.54
7.3.160.0080.00816.63
7.3.120.0090.00615.08
7.3.110.0080.00614.78
7.3.100.0000.01615.09
7.3.90.0060.00914.93
7.3.80.0000.00814.83
7.3.70.0040.01114.83
7.3.60.0090.00614.88
7.3.50.0070.00714.54
7.3.40.0090.00314.80
7.3.30.0030.00614.96
7.3.20.0110.00316.58
7.3.10.0050.00716.70
7.3.00.0040.00916.60
7.2.330.0100.01316.64
7.2.320.0090.00916.67
7.2.310.0000.01716.74
7.2.300.0110.01216.71
7.2.290.0130.00316.72
7.2.250.0000.01214.89
7.2.240.0090.00915.08
7.2.230.0040.01115.00
7.2.220.0000.01615.07
7.2.210.0040.01114.61
7.2.200.0090.00314.96
7.2.190.0000.00914.82
7.2.180.0070.00715.06
7.2.170.0040.01114.82
7.2.130.0090.00316.68
7.2.120.0090.00616.96
7.2.110.0080.00416.94
7.2.100.0060.00616.92
7.2.90.0070.00716.78
7.2.80.0060.00317.06
7.2.70.0030.01216.93
7.2.60.0070.00716.94
7.2.50.0060.00917.02
7.2.40.0000.01316.97
7.2.30.0060.01017.07
7.2.20.0070.01016.86
7.2.10.0040.00816.73
7.2.00.0060.00316.76
7.1.330.0030.01015.70
7.1.320.0120.00015.95
7.1.310.0070.00715.55
7.1.300.0070.00315.61
7.1.290.0050.00315.61
7.1.280.0070.00415.90
7.1.270.0070.00715.61
7.1.260.0030.00715.77
7.1.250.0100.00315.54
7.1.200.0080.00815.75
7.1.70.0030.00317.25
7.1.60.0080.00317.29
7.1.00.0170.05722.50
7.0.200.0100.00016.84
7.0.140.0000.06722.04
7.0.130.0070.06322.12
7.0.120.0070.06022.10
7.0.110.0030.06321.97
7.0.100.0000.06021.99
7.0.90.0000.06322.13
7.0.80.0030.06022.14
7.0.70.0030.06022.03
7.0.60.0070.05722.07
7.0.50.0130.06022.14
7.0.40.0100.05722.13
7.0.30.0030.05722.09
7.0.20.0130.04722.01
7.0.10.0100.05022.08
7.0.00.0100.05022.19
5.6.290.0130.05020.95
5.6.280.0100.05020.93
5.6.270.0230.06020.91
5.6.260.0130.05020.92
5.6.250.0100.05320.80
5.6.240.0070.05721.02
5.6.230.0100.05320.73
5.6.220.0070.06021.11
5.6.210.0070.05720.90
5.6.200.0030.06320.88
5.6.190.0170.05020.88
5.6.180.0030.06020.89
5.6.170.0030.05720.91
5.6.160.0030.06321.02
5.6.150.0030.06021.02
5.6.140.0130.06721.03
5.6.130.0130.05320.99
5.6.120.0030.06020.84
5.6.110.0070.06020.87
5.6.100.0130.05021.03
5.6.90.0000.06020.97
5.6.80.0000.05720.41
5.6.70.0100.05020.36
5.6.60.0100.05720.39
5.6.50.0030.05320.41
5.6.40.0030.05320.41
5.6.30.0030.05720.41
5.6.20.0000.07020.34
5.6.10.0070.05020.43
5.6.00.0070.05720.19

preferences:
59.94 ms | 401 KiB | 5 Q