3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( array('amount'=>100,'date'=>'2014-04-29'), array('amount'=>120,'date'=>'2014-03-30'), array('amount'=>200,'date'=>'2014-03-31') ); usort($arr, function($a, $b) { if($a['date'] == $b['date']) return 0; return $a['date'] > $b['date'] ? 1 : -1; }); var_dump($arr); $amount = 0; foreach($arr as &$item) { $amount += $item['amount']; $item['amount'] = $amount; } var_dump($arr);

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.0000.01418.43
8.3.50.0170.00422.02
8.3.40.0110.00418.97
8.3.30.0060.00919.22
8.3.20.0080.00020.35
8.3.10.0050.00322.00
8.3.00.0040.00422.39
8.2.180.0120.00316.88
8.2.170.0090.00622.96
8.2.160.0070.01022.11
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0070.01026.16
8.2.120.0050.00319.61
8.2.110.0030.00722.02
8.2.100.0120.00019.76
8.2.90.0000.00819.14
8.2.80.0080.00018.04
8.2.70.0040.00417.50
8.2.60.0080.00317.91
8.2.50.0050.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.23
8.2.20.0000.00817.79
8.2.10.0040.00417.67
8.2.00.0080.00017.75
8.1.280.0030.01025.92
8.1.270.0040.00422.13
8.1.260.0090.00326.35
8.1.250.0100.00028.09
8.1.240.0040.00423.97
8.1.230.0060.00619.21
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0100.00017.36
8.1.190.0060.00317.65
8.1.180.0080.00018.10
8.1.170.0030.00518.56
8.1.160.0040.00421.93
8.1.150.0000.00718.60
8.1.140.0050.00317.45
8.1.130.0040.00417.68
8.1.120.0000.00817.53
8.1.110.0070.00017.39
8.1.100.0040.00417.36
8.1.90.0000.00717.33
8.1.80.0030.00417.36
8.1.70.0000.00717.42
8.1.60.0080.00417.47
8.1.50.0050.00217.45
8.1.40.0000.00817.54
8.1.30.0070.00017.52
8.1.20.0000.00817.72
8.1.10.0040.00417.54
8.1.00.0080.00017.40
8.0.300.0040.00418.77
8.0.290.0000.00817.16
8.0.280.0050.00218.45
8.0.270.0000.00817.30
8.0.260.0070.00016.83
8.0.250.0040.00416.86
8.0.240.0000.00816.92
8.0.230.0040.00416.87
8.0.220.0000.00716.86
8.0.210.0000.00716.90
8.0.200.0060.00316.71
8.0.190.0070.00016.82
8.0.180.0040.00416.94
8.0.170.0000.00916.87
8.0.160.0000.00816.96
8.0.150.0030.00316.82
8.0.140.0040.00416.88
8.0.130.0000.00713.38
8.0.120.0000.00716.90
8.0.110.0070.00016.80
8.0.100.0040.00416.77
8.0.90.0000.00816.91
8.0.80.0040.01416.85
8.0.70.0040.00416.87
8.0.60.0040.00416.87
8.0.50.0000.00716.78
8.0.30.0120.00917.16
8.0.20.0120.00717.40
8.0.10.0040.00416.81
8.0.00.0150.01116.81
7.4.330.0030.00315.00
7.4.320.0030.00316.41
7.4.300.0000.00616.51
7.4.290.0000.00716.49
7.4.280.0070.00016.49
7.4.270.0030.00316.58
7.4.260.0030.00316.55
7.4.250.0040.00416.61
7.4.240.0020.00616.59
7.4.230.0080.00016.61
7.4.220.0040.01316.54
7.4.210.0100.00916.60
7.4.200.0030.00316.62
7.4.190.0030.00316.46
7.4.160.0060.01116.22
7.4.150.0170.00717.40
7.4.140.0090.01117.86
7.4.130.0100.01116.46
7.4.120.0100.01216.57
7.4.110.0090.00916.62
7.4.100.0100.01316.70
7.4.90.0160.00616.45
7.4.80.0060.01219.39
7.4.70.0120.00616.75
7.4.60.0060.00916.39
7.4.50.0000.00816.61
7.4.40.0070.01022.77
7.4.30.0100.00616.46
7.4.00.0070.00414.97
7.3.330.0020.00213.37
7.3.320.0050.00013.32
7.3.310.0070.00016.41
7.3.300.0000.00716.23
7.3.290.0150.00316.44
7.3.280.0070.00916.38
7.3.270.0120.00917.40
7.3.260.0100.00716.35
7.3.250.0080.01016.42
7.3.240.0100.00716.57
7.3.230.0100.00716.44
7.3.210.0150.00316.55
7.3.200.0120.00619.39
7.3.190.0070.01116.45
7.3.180.0060.01016.55
7.3.170.0100.00716.51
7.3.160.0040.01216.48
7.3.120.0140.00015.02
7.2.330.0110.00816.68
7.2.320.0070.01716.42
7.2.310.0130.00316.84
7.2.300.0140.00516.84
7.2.290.0140.00416.82
7.2.60.0130.00016.90
7.2.00.0040.00719.34
7.1.200.0090.00315.74
7.1.100.0030.00918.21
7.1.70.0000.00917.11
7.1.60.0130.01019.82
7.1.50.0170.00717.02
7.1.00.0030.09022.43
7.0.200.0000.01016.64
7.0.140.0030.07322.08
7.0.60.0100.08019.92
7.0.50.0000.08017.87
7.0.40.0130.08320.09
7.0.30.0230.07720.06
7.0.20.0270.07320.07
7.0.10.0130.07720.10
7.0.00.0130.08020.06
5.6.280.0030.07320.99
5.6.210.0000.09020.70
5.6.200.0030.07718.19
5.6.190.0000.07720.65
5.6.180.0470.07320.35
5.6.170.0130.09320.55
5.6.160.0070.05720.46
5.6.150.0000.04018.18
5.6.140.0030.08318.26
5.6.130.0130.05318.17
5.6.120.0030.09021.14
5.6.110.0070.06021.04
5.6.100.0070.08021.00
5.6.90.0100.03721.00
5.6.80.0070.07320.39
5.5.350.0300.06720.40
5.5.340.0100.07717.92
5.5.330.0030.04720.44
5.5.320.0070.08020.38
5.5.310.0370.06320.31
5.5.300.0070.07317.97
5.5.290.0000.05718.07
5.5.280.0100.08320.87
5.5.270.0170.07320.66
5.5.260.0100.07720.76
5.5.250.0100.03720.55
5.5.240.0030.03020.27
5.4.450.0470.06319.43
5.4.440.0300.05719.61
5.4.430.0170.04719.56
5.4.420.0070.05719.43
5.4.410.0230.06319.27
5.4.400.0830.00018.54
5.4.390.0800.00018.72
5.4.380.0330.04718.75
5.4.370.0230.04318.46
5.4.360.0130.05018.61
5.4.350.0130.05318.72
5.4.340.0130.05318.50
5.4.320.0050.03712.50
5.4.310.0090.03512.50
5.4.300.0080.03412.51
5.4.290.0120.04112.50
5.4.280.0040.03712.40
5.4.270.0100.05019.00
5.4.260.0170.06018.96
5.4.250.0230.06318.95
5.4.240.0070.06318.95
5.4.230.0200.05718.75
5.4.220.0170.06018.79
5.4.210.0130.05019.02
5.4.200.0200.05318.83
5.4.190.0100.05318.99
5.4.180.0130.07718.98
5.4.170.0130.08018.96
5.4.160.0070.06018.98
5.4.150.0130.05318.95
5.4.140.0100.06316.31
5.4.130.0070.04716.55
5.4.120.0200.05316.59
5.4.110.0100.07016.48
5.4.100.0100.04716.52
5.4.90.0100.05016.55
5.4.80.0200.07316.56
5.4.70.0030.07016.55
5.4.60.0200.06316.56
5.4.50.0070.05016.61
5.4.40.0030.06016.59
5.4.30.0100.04716.45
5.4.20.0030.05316.35
5.4.10.0100.05716.38
5.4.00.0130.07015.79
5.3.290.0050.04512.80
5.3.280.0130.05314.73
5.3.270.0000.07714.58
5.3.260.0100.06714.70
5.3.250.0130.06714.59
5.3.240.0170.06014.57
5.3.230.0130.06314.64
5.3.220.0200.06714.65
5.3.210.0130.04714.75
5.3.200.0100.05014.75
5.3.190.0170.05714.40
5.3.180.0170.06714.55
5.3.170.0070.05714.72
5.3.160.0170.05014.55
5.3.150.0170.06014.64
5.3.140.0100.06014.78
5.3.130.0130.04714.53
5.3.120.0030.06014.54
5.3.110.0100.05714.38
5.3.100.0170.05014.13
5.3.90.0070.07313.84
5.3.80.0070.05714.00
5.3.70.0130.06714.09
5.3.60.0200.05314.07
5.3.50.0100.04714.03
5.3.40.0030.07714.03
5.3.30.0100.05014.07
5.3.20.0030.05313.78
5.3.10.0200.05013.71
5.3.00.0170.04313.64
5.2.170.0270.03711.07
5.2.160.0030.04311.16
5.2.150.0230.05011.08
5.2.140.0100.03711.13
5.2.130.0100.03310.85
5.2.120.0070.04711.02
5.2.110.0130.04711.11
5.2.100.0130.03711.19
5.2.90.0130.05011.00
5.2.80.0070.04711.11
5.2.70.0130.05711.18
5.2.60.0100.04011.07
5.2.50.0070.04710.96
5.2.40.0070.04010.90
5.2.30.0170.05010.88
5.2.20.0130.04310.88
5.2.10.0170.03010.79
5.2.00.0030.04010.73
5.1.60.0030.0379.89
5.1.50.0170.0409.77
5.1.40.0070.04010.13
5.1.30.0070.05010.40
5.1.20.0100.03010.35
5.1.10.0200.02710.09
5.1.00.0130.0439.93
5.0.50.0030.0338.63
5.0.40.0030.0278.50
5.0.30.0100.0408.09
5.0.20.0030.0338.24
5.0.10.0030.0408.18
5.0.00.0070.0478.21
4.4.90.0100.0176.82
4.4.80.0030.0236.82
4.4.70.0070.0306.82
4.4.60.0030.0206.82
4.4.50.0030.0336.82
4.4.40.0070.0306.82
4.4.30.0000.0236.82
4.4.20.0070.0236.82
4.4.10.0030.0306.82
4.4.00.0030.0406.82
4.3.110.0030.0236.82
4.3.100.0030.0276.82
4.3.90.0000.0236.82
4.3.80.0030.0376.82
4.3.70.0070.0176.82
4.3.60.0030.0206.82
4.3.50.0000.0236.82
4.3.40.0000.0336.82
4.3.30.0000.0306.82
4.3.20.0030.0276.82
4.3.10.0030.0236.82
4.3.00.0130.0207.18

preferences:
44.56 ms | 400 KiB | 5 Q