3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( array('amount'=>100,'date'=>'2014-03-29'), array('amount'=>120,'date'=>'2014-03-30'), array('amount'=>200,'date'=>'2014-03-31'), array('amount'=>0,'date'=>'2014-04-31') ); function sd($a,$b) {if($a['date'] == $b['date']) return 0; return $a['date'] >$b['date'] ? 1 : -1;} usort($arr, 'sd'); $amount = 0; foreach($arr as &$item) { $amount += $item['amount']; $item['amount'] = $amount; } print_r($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.0090.01218.56
8.3.50.0120.00521.14
8.3.40.0100.01018.55
8.3.30.0030.01020.20
8.3.20.0050.00320.34
8.3.10.0040.00422.07
8.3.00.0050.00322.46
8.2.180.0090.00616.50
8.2.170.0120.00322.96
8.2.160.0100.00320.25
8.2.150.0000.00824.18
8.2.140.0190.00324.66
8.2.130.0060.00326.16
8.2.120.0040.00419.78
8.2.110.0060.00320.37
8.2.100.0060.00617.78
8.2.90.0040.00419.36
8.2.80.0070.00019.44
8.2.70.0090.00317.49
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0030.00518.09
8.2.30.0080.00019.79
8.2.20.0000.00717.63
8.2.10.0040.00417.66
8.2.00.0000.00817.64
8.1.280.0070.00725.92
8.1.270.0040.00820.39
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0130.00021.98
8.1.230.0110.00022.71
8.1.220.0030.00617.80
8.1.210.0000.00818.77
8.1.200.0000.00917.23
8.1.190.0080.00017.54
8.1.180.0000.00718.75
8.1.170.0000.00818.66
8.1.160.0050.00222.01
8.1.150.0070.00018.64
8.1.140.0080.00017.50
8.1.130.0030.00517.70
8.1.120.0070.00017.38
8.1.110.0050.00317.34
8.1.100.0030.00517.53
8.1.90.0050.00317.45
8.1.80.0040.00417.39
8.1.70.0030.00317.43
8.1.60.0040.00417.54
8.1.50.0040.00417.50
8.1.40.0000.00717.54
8.1.30.0000.00717.57
8.1.20.0090.00017.61
8.1.10.0080.00017.49
8.1.00.0070.00017.54
8.0.300.0040.00418.77
8.0.290.0040.00416.91
8.0.280.0030.00318.35
8.0.270.0040.00417.12
8.0.260.0030.00316.69
8.0.250.0040.00416.88
8.0.240.0040.00416.83
8.0.230.0000.00716.93
8.0.220.0070.00016.83
8.0.210.0000.00716.84
8.0.200.0030.00316.82
8.0.190.0030.00516.84
8.0.180.0030.00316.92
8.0.170.0000.00716.82
8.0.160.0070.00016.94
8.0.150.0030.00516.84
8.0.140.0000.00716.88
8.0.130.0000.00513.39
8.0.120.0090.00016.75
8.0.110.0000.00716.89
8.0.100.0040.00416.88
8.0.90.0000.00816.94
8.0.80.0110.00516.93
8.0.70.0040.00416.86
8.0.60.0000.00716.78
8.0.50.0000.00716.77
8.0.30.0090.00917.01
8.0.20.0130.00917.40
8.0.10.0000.00717.01
8.0.00.0050.01316.76
7.4.330.0000.00515.00
7.4.320.0030.00316.41
7.4.300.0060.00016.43
7.4.290.0030.00316.55
7.4.280.0030.00316.57
7.4.270.0030.00316.45
7.4.260.0030.00316.50
7.4.250.0040.00416.55
7.4.240.0030.00516.54
7.4.230.0000.00716.70
7.4.220.0070.01016.47
7.4.210.0090.00516.58
7.4.200.0070.00016.58
7.4.190.0030.00516.57
7.4.160.0100.00616.51
7.4.150.0060.01217.40
7.4.140.0090.01117.86
7.4.130.0080.00916.55
7.4.120.0130.00316.50
7.4.110.0100.01316.37
7.4.100.0060.01116.52
7.4.90.0000.01616.57
7.4.80.0170.00419.39
7.4.70.0070.01516.43
7.4.60.0060.01016.48
7.4.50.0040.00016.60
7.4.40.0060.00622.77
7.4.30.0030.01316.47
7.4.00.0040.01115.16
7.3.330.0000.00513.26
7.3.320.0030.00313.32
7.3.310.0070.00016.38
7.3.300.0030.00316.20
7.3.290.0070.00716.36
7.3.280.0090.00516.30
7.3.270.0060.01017.40
7.3.260.0130.00316.35
7.3.250.0120.00516.49
7.3.240.0040.01416.36
7.3.230.0110.00616.39
7.3.210.0090.00916.61
7.3.200.0040.01319.39
7.3.190.0080.01516.51
7.3.180.0090.00916.46
7.3.170.0120.00616.43
7.3.160.0070.01016.40
7.3.120.0070.01014.90
7.3.10.0090.00616.72
7.3.00.0030.00616.65
7.2.330.0080.00816.63
7.2.320.0150.00316.72
7.2.310.0030.01516.72
7.2.300.0090.00616.57
7.2.290.0110.00816.80
7.2.130.0040.01216.67
7.2.120.0100.00317.11
7.2.110.0140.00316.87
7.2.100.0040.00816.97
7.2.90.0110.00416.98
7.2.80.0090.00617.11
7.2.70.0110.00016.92
7.2.60.0020.00816.90
7.2.50.0040.00816.91
7.2.40.0090.00017.15
7.2.30.0030.01016.80
7.2.20.0110.00017.18
7.2.10.0030.01317.07
7.2.00.0070.00716.92
7.1.250.0000.01515.79
7.1.200.0030.00715.81
7.1.70.0040.00417.26
7.1.60.0140.01019.40
7.1.50.0070.01717.02
7.1.00.0070.04722.41
7.0.200.0100.00716.86
7.0.140.0070.07321.97
7.0.60.0070.07019.91
7.0.50.0000.08317.85
7.0.40.0070.09020.42
7.0.30.0200.05720.11
7.0.20.0270.06320.30
7.0.10.0270.04020.23
7.0.00.0100.08320.06
5.6.280.0000.07720.84
5.6.210.0130.08020.75
5.6.200.0030.05318.16
5.6.190.0100.04720.77
5.6.180.3430.04720.57
5.6.170.0230.08320.56
5.6.160.0070.08320.55
5.6.150.0070.08318.15
5.6.140.0070.08018.18
5.6.130.0070.03718.16
5.6.120.0030.04321.02
5.6.110.0170.06721.14
5.6.100.0230.07721.02
5.6.90.0030.04320.89
5.6.80.0130.06720.43
5.6.70.0200.07720.42
5.5.350.0070.06320.33
5.5.340.0000.04317.95
5.5.330.0100.08320.21
5.5.320.0200.05020.34
5.5.310.0200.08020.37
5.5.300.0130.03017.96
5.5.290.0100.07718.06
5.5.280.0030.04720.77
5.5.270.0070.08020.73
5.5.260.0100.08020.87
5.5.250.0070.08320.69
5.5.240.0100.07720.35
5.4.450.0870.06319.59
5.4.440.0700.06719.33
5.4.430.0800.06019.30
5.4.420.0030.06019.46
5.4.410.0370.05319.20
5.4.400.0970.06318.52
5.4.390.1330.05018.71
5.4.380.0200.06018.61
5.4.370.0070.06018.59
5.4.360.0100.05718.78
5.4.350.0110.04912.02
5.4.340.0090.03612.01
5.4.320.0060.03612.51
5.4.310.0110.03412.50
5.4.300.0080.03612.51
5.4.290.0040.04012.50
5.4.280.0070.03412.40
5.4.270.0070.05318.89
5.4.260.0100.06018.64
5.4.250.0070.05318.89
5.4.240.0070.06719.01
5.4.230.0030.05718.99
5.4.220.0170.07018.91
5.4.210.0070.06018.94
5.4.200.0100.07318.98
5.4.190.0100.05018.73
5.4.180.0100.07718.95
5.4.170.0170.06019.00
5.4.160.0070.05718.80
5.4.150.0070.06018.96
5.4.140.0100.05016.43
5.4.130.0100.04716.51
5.4.120.0170.06016.39
5.4.110.0130.07016.39
5.4.100.0100.04716.47
5.4.90.0100.06716.47
5.4.80.0070.05016.46
5.4.70.0000.05716.54
5.4.60.0100.05316.37
5.4.50.0070.04716.62
5.4.40.0100.04716.67
5.4.30.0130.05016.46
5.4.20.0000.05316.44
5.4.10.0030.05316.45
5.4.00.0000.05315.85
5.3.290.0060.03912.80
5.3.280.0100.05014.50
5.3.270.0070.05314.70
5.3.260.0170.04314.69
5.3.250.0100.05014.63
5.3.240.0070.05014.74
5.3.230.0100.05014.57
5.3.220.0070.05314.55
5.3.210.0100.05714.64
5.3.200.0170.04314.65
5.3.190.0070.05014.70
5.3.180.0100.04714.55
5.3.170.0070.05014.56
5.3.160.0070.07714.79
5.3.150.0130.04714.65
5.3.140.0070.05014.38
5.3.130.0100.07014.61
5.3.120.0170.04014.53
5.3.110.0070.05314.61
5.3.100.0000.05714.02
5.3.90.0000.05314.10
5.3.80.0100.04313.93
5.3.70.0070.06014.03
5.3.60.0000.05314.08
5.3.50.0070.05013.94
5.3.40.0030.05313.78
5.3.30.0070.07014.09
5.3.20.0100.04313.92
5.3.10.0070.06013.71
5.3.00.0070.05013.71
5.2.170.0070.04310.98
5.2.160.0100.03711.11
5.2.150.0030.04311.21
5.2.140.0170.03011.20
5.2.130.0170.03011.32
5.2.120.0100.04011.05
5.2.110.0070.05711.28
5.2.100.0100.03711.18
5.2.90.0030.04011.00
5.2.80.0070.04011.31
5.2.70.0070.04011.09
5.2.60.0000.04711.14
5.2.50.0070.03711.20
5.2.40.0070.03711.18
5.2.30.0000.04711.19
5.2.20.0030.04010.91
5.2.10.0070.04010.84
5.2.00.0170.04310.73
5.1.60.0130.0439.92
5.1.50.0070.03310.05
5.1.40.0030.0409.95
5.1.30.0100.04310.41
5.1.20.0130.04710.31
5.1.10.0170.03310.30
5.1.00.0030.0379.98
5.0.50.0000.0338.54
5.0.40.0030.0278.32
5.0.30.0030.0438.42
5.0.20.0070.0238.26
5.0.10.0000.0338.26
5.0.00.0070.0408.31
4.4.90.0030.0237.39
4.4.80.0030.0207.39
4.4.70.0070.0177.39
4.4.60.0000.0237.39
4.4.50.0030.0207.39
4.4.40.0000.0377.39
4.4.30.0000.0277.39
4.4.20.0000.0307.39
4.4.10.0000.0237.39
4.4.00.0000.0377.39
4.3.110.0030.0237.39
4.3.100.0000.0337.39
4.3.90.0070.0177.39
4.3.80.0000.0407.39
4.3.70.0100.0107.39
4.3.60.0000.0237.39
4.3.50.0000.0277.39
4.3.40.0030.0337.39
4.3.30.0000.0337.39
4.3.20.0000.0237.39
4.3.10.0030.0207.39
4.3.00.0030.0206.77

preferences:
49.44 ms | 401 KiB | 5 Q