3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1, 2]; sort($arr); echo json_encode($arr); $arr = [2, 1]; sort($arr); echo json_encode($arr); $arr = ['foo' => 2, 'bar' => 1]; sort($arr); echo json_encode($arr); $arr = [2, 1]; // note: asort asort($arr); echo json_encode($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.5.10.0090.00718.73
8.5.00.0130.00919.91
8.4.150.0010.00114.05
8.4.140.0100.01017.48
8.4.130.0110.01017.65
8.4.120.0090.01120.66
8.4.110.0130.00722.38
8.4.100.0040.00422.47
8.4.90.0090.01218.70
8.4.80.0100.01019.46
8.4.70.0050.01117.81
8.4.60.0110.00918.72
8.4.50.0090.01018.83
8.4.40.0170.00317.63
8.4.30.0030.00618.57
8.4.20.0040.01619.80
8.4.10.0090.00019.43
8.3.280.0130.00618.26
8.3.270.0100.01016.47
8.3.260.0100.00916.72
8.3.250.0120.00618.70
8.3.240.0050.00317.19
8.3.230.0090.01116.57
8.3.220.0120.00517.13
8.3.210.0140.00518.39
8.3.200.0040.00516.64
8.3.190.0100.00817.13
8.3.180.0050.00416.69
8.3.170.0150.00318.73
8.3.160.0100.00018.20
8.3.150.0110.00716.60
8.3.140.0150.00317.04
8.3.130.0170.00018.16
8.3.120.0040.00420.75
8.3.110.0090.00618.19
8.3.100.0130.00616.66
8.3.90.0000.00926.77
8.3.80.0070.00318.17
8.3.70.0110.00416.58
8.3.60.0140.00418.18
8.3.50.0120.00320.10
8.3.40.0110.00419.83
8.3.30.0060.00918.32
8.3.20.0040.00424.18
8.3.10.0180.00724.66
8.3.00.0050.00226.16
8.2.290.0110.00820.05
8.2.280.0100.00819.97
8.2.270.0120.00618.90
8.2.260.0080.00018.58
8.2.250.0030.00618.92
8.2.240.0100.00616.43
8.2.230.0070.00320.94
8.2.220.0090.00924.06
8.2.210.0060.00326.77
8.2.200.0060.00316.63
8.2.190.0160.00618.16
8.2.180.0080.01125.92
8.2.170.0120.00918.96
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0000.00826.16
8.2.120.0070.00026.16
8.2.110.0050.00520.57
8.2.100.0040.00817.88
8.2.90.0030.00517.75
8.2.80.0080.00017.97
8.2.70.0000.00917.50
8.2.60.0050.00317.63
8.2.50.0040.00417.98
8.2.40.0000.00718.16
8.2.30.0040.00417.95
8.2.20.0000.00820.53
8.2.10.0000.00817.60
8.2.00.0040.00419.05
8.1.330.0070.01022.07
8.1.320.0060.01418.48
8.1.310.0110.00718.43
8.1.300.0000.00818.17
8.1.290.0060.00330.84
8.1.280.0060.00925.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0100.00028.09
8.1.240.0030.00719.14
8.1.230.0000.01117.83
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0050.00317.10
8.1.180.0030.00518.10
8.1.170.0090.00017.62
8.1.160.0040.00418.88
8.1.150.0070.00018.56
8.1.140.0090.00017.29
8.1.130.0000.00718.82
8.1.120.0080.00417.41
8.1.110.0080.00017.28
8.1.100.0030.00417.38
8.1.90.0030.00517.27
8.1.80.0030.00617.45
8.1.70.0080.00017.28
8.1.60.0040.00417.49
8.1.50.0050.00517.42
8.1.40.0000.00817.45
8.1.30.0030.00617.50
8.1.20.0130.00617.52
8.1.10.0180.00517.47
8.1.00.0190.00617.40
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0070.00018.27
8.0.270.0000.00716.80
8.0.260.0000.00618.39
8.0.250.0030.00616.83
8.0.240.0090.00016.91
8.0.230.0030.00316.86
8.0.220.0050.00216.76
8.0.210.0000.00716.82
8.0.200.0040.00416.71
8.0.190.0070.00016.77
8.0.180.0070.00016.79
8.0.170.0050.00316.72
8.0.160.0080.00416.88
8.0.150.0120.00216.73
8.0.140.0170.00216.72
8.0.130.0160.00516.64
8.0.120.0160.00516.72
8.0.110.0160.00416.67
8.0.100.0160.00516.78
8.0.90.0150.00516.76
8.0.80.0170.00416.76
8.0.70.0170.00416.69
8.0.60.0130.00716.73
8.0.50.0140.00716.75
8.0.30.0160.00316.77
8.0.20.0160.00416.79
8.0.10.0150.00516.89
7.4.330.0030.00315.55
7.4.320.0000.00816.48
7.4.300.0000.00616.40
7.4.290.0060.00316.38
7.4.280.0030.00516.40
7.4.270.0110.00616.44
7.4.260.0120.00616.40
7.4.250.0140.00316.42
7.4.240.0120.00416.43
7.4.230.0160.00316.37
7.4.220.0140.00516.44
7.4.210.0130.00616.51
7.4.200.0130.00716.47
7.4.190.0130.00616.45
7.4.180.0130.00416.41
7.4.160.0110.00816.43
7.4.150.0140.00516.40
7.4.140.0140.00316.33
7.4.130.0080.00816.31
7.4.120.0150.00316.36
7.4.110.0110.00616.31
7.4.100.0100.00516.35
7.4.90.0100.00516.32
7.4.80.0120.00516.35
7.4.70.0150.00416.38
7.4.60.0170.00116.35
7.4.50.0150.00416.22
7.4.40.0140.00516.25
7.4.30.0110.00716.37
7.4.20.0150.00416.31
7.4.10.0110.00716.36
7.4.00.0130.00616.35

preferences:
37.36 ms | 403 KiB | 5 Q