3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Todaysales = array( array("sale_time"=>"2017-09-10","payment_amount"=>1311.45), array("sale_time"=>"2017-09-10","payment_amount"=>1311.46), array("sale_time"=>"2017-09-10","payment_amount"=>175000.00), ); $data = array(); foreach($Todaysales as $d) { $match_key =false; $match_key = array_search($d['sale_time'],array_column($data, "cols")); if($match_key > 0 || $match_key === 0) $data[$match_key]["rows"] = $data[$match_key]["rows"] + $d['payment_amount']; else $data[] = array("cols"=>$d['sale_time'],"rows"=>$d['payment_amount']); } print_r($data);

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.130.0100.01016.60
8.3.120.0080.00019.20
8.3.110.0030.00620.94
8.3.100.0120.00316.62
8.3.90.0050.00326.77
8.3.80.0030.00616.63
8.3.70.0070.01016.75
8.3.60.0110.00416.50
8.3.50.0160.00616.43
8.3.40.0070.00718.82
8.3.30.0120.00318.65
8.3.20.0000.00720.21
8.3.10.0030.00620.78
8.3.00.0080.00020.86
8.2.250.0130.00719.06
8.2.240.0090.00917.13
8.2.230.0100.00722.58
8.2.220.0040.00424.06
8.2.210.0090.00626.77
8.2.200.0080.00016.88
8.2.190.0120.00616.88
8.2.180.0090.00916.75
8.2.170.0080.00818.95
8.2.160.0160.00022.96
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00021.04
8.2.120.0040.00426.16
8.2.110.0050.00522.07
8.2.100.0060.00617.97
8.2.90.0030.00619.12
8.2.80.0040.00419.32
8.2.70.0080.00017.74
8.2.60.0100.00017.90
8.2.50.0040.00418.22
8.2.40.0060.00320.60
8.2.30.0040.00419.26
8.2.20.0080.00018.15
8.2.10.0000.00818.15
8.2.00.0040.00418.02
8.1.300.0100.00718.66
8.1.290.0100.00030.84
8.1.280.0100.01025.92
8.1.270.0070.00023.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.87
8.1.230.0110.00017.70
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0000.00817.36
8.1.190.0080.00017.35
8.1.180.0000.00718.10
8.1.170.0000.00818.54
8.1.160.0040.00418.91
8.1.150.0000.00720.18
8.1.140.0040.00419.73
8.1.130.0030.00518.92
8.1.120.0000.00717.52
8.1.110.0080.00017.56
8.1.100.0000.00717.53
8.1.90.0040.00417.52
8.1.80.0030.00317.47
8.1.70.0030.00317.52
8.1.60.0050.00317.60
8.1.50.0030.00817.55
8.1.40.0050.00317.52
8.1.30.0040.00417.63
8.1.20.0060.00317.69
8.1.10.0000.00817.50
8.1.00.0100.00317.46
8.0.300.0080.00018.77
8.0.290.0030.00516.75
8.0.280.0000.00718.38
8.0.270.0040.00416.72
8.0.260.0030.00318.81
8.0.250.0030.00316.88
8.0.240.0000.00716.97
8.0.230.0080.00017.02
8.0.220.0030.00316.82
8.0.210.0030.00316.80
8.0.200.0040.00416.94
8.0.190.0060.00316.86
8.0.180.0000.00816.85
8.0.170.0070.00016.95
8.0.160.0000.00716.86
8.0.150.0000.00716.75
8.0.140.0050.00216.80
8.0.130.0000.00513.41
8.0.120.0050.00216.95
8.0.110.0040.00416.93
8.0.100.0030.00316.94
8.0.90.0020.00516.71
8.0.80.0120.00316.97
8.0.70.0050.00316.78
8.0.60.0000.00716.87
8.0.50.0070.00016.78
8.0.30.0120.00317.36
8.0.20.0130.00817.40
8.0.10.0040.00416.86
8.0.00.0090.00916.86
7.4.330.0000.00515.55
7.4.320.0070.00016.56
7.4.300.0060.00016.59
7.4.290.0030.00516.47
7.4.280.0000.00816.53
7.4.270.0000.00716.52
7.4.260.0000.00716.61
7.4.250.0030.00316.37
7.4.240.0000.00716.43
7.4.230.0030.00316.51
7.4.220.0130.00616.69
7.4.210.0090.00616.53
7.4.200.0040.00416.46
7.4.160.0070.01216.50
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0120.00916.53
7.4.120.0100.01116.61
7.4.110.0100.00716.52
7.4.100.0070.01116.57
7.4.90.0100.00716.45
7.4.80.0100.00619.39
7.4.70.0130.00316.46
7.4.60.0100.00616.52
7.4.50.0000.01516.66
7.4.40.0070.01016.44
7.4.30.0120.00416.27
7.4.00.0100.00715.00
7.3.330.0000.00513.26
7.3.320.0000.00513.16
7.3.310.0030.00316.34
7.3.300.0000.00716.30
7.3.290.0040.00416.23
7.3.280.0060.01016.35
7.3.270.0140.00417.40
7.3.260.0090.00716.27
7.3.250.0120.00616.38
7.3.240.0080.00816.57
7.3.230.0030.01416.28
7.3.210.0070.01116.63
7.3.200.0080.00916.63
7.3.190.0090.00616.43
7.3.180.0080.00816.55
7.3.170.0080.00916.39
7.3.160.0070.01016.57
7.3.10.0120.00416.35
7.3.00.0070.00316.55
7.2.330.0060.01216.45
7.2.320.0030.01316.48
7.2.310.0090.00916.62
7.2.300.0030.01416.67
7.2.290.0030.01316.51
7.2.130.0030.01016.93
7.2.120.0040.00816.92
7.2.110.0030.01016.77
7.2.100.0030.01316.74
7.2.90.0000.01417.05
7.2.80.0110.00417.02
7.2.70.0030.01217.05
7.2.60.0050.00817.00
7.2.50.0080.00616.75
7.2.40.0070.01016.85
7.2.30.0030.01416.95
7.2.20.0120.00616.73
7.2.10.0090.00816.79
7.2.00.0070.00716.73
7.1.250.0030.00915.84
7.1.200.0000.01015.61
7.1.90.0000.01317.98
7.1.80.0070.00717.77
7.1.70.0090.00317.07
7.1.60.0180.00735.19
7.1.50.0190.00634.59
7.1.40.0130.01334.57
7.1.30.0170.01034.67
7.1.20.0160.01034.54
7.1.10.0030.01016.50
7.1.00.0060.00616.50
7.0.230.0040.00817.47
7.0.220.0030.00917.68
7.0.210.0090.00316.51
7.0.200.0000.01116.70
7.0.190.0060.00616.58
7.0.180.0000.01216.36
7.0.170.0030.01016.05
7.0.160.0000.01116.18
7.0.150.0080.00516.20
7.0.140.0100.00316.40
7.0.130.0090.00316.53
7.0.120.0000.01216.50
7.0.110.0130.00916.36
7.0.100.0090.01216.34
7.0.90.0000.01316.16
7.0.80.0060.00616.21
7.0.70.0040.00816.35
7.0.60.0060.00615.93
7.0.50.0060.00616.07
7.0.40.0060.00616.34
7.0.30.0090.00416.44
7.0.20.0030.00916.27
7.0.10.0060.00616.31
7.0.00.0000.01216.28

preferences:
29.97 ms | 403 KiB | 5 Q