3v4l.org

run code in 300+ PHP versions simultaneously
<?php // New syntax since PHP 7.4 $a = [3, 2, 5, 6, 1]; usort($a, fn($a, $b) => $a<=>$b); foreach ($a as $key => $value) { echo "$key: $value\n"; }

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.0070.00318.32
8.3.120.0070.01120.64
8.3.110.0060.00320.94
8.3.100.0000.01816.23
8.3.90.0080.01116.36
8.3.80.0030.00618.43
8.3.70.0120.00318.34
8.3.60.0190.00618.55
8.3.50.0090.01019.24
8.3.40.0040.01118.57
8.3.30.0090.00618.60
8.3.20.0070.00021.89
8.3.10.0070.00021.86
8.3.00.0060.00323.27
8.2.250.0050.00316.79
8.2.240.0070.01118.82
8.2.230.0080.00022.58
8.2.220.0000.00824.06
8.2.210.0030.01426.77
8.2.200.0030.00618.41
8.2.190.0100.00316.75
8.2.180.0150.00618.28
8.2.170.0200.00022.96
8.2.160.0110.00319.20
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00421.06
8.2.110.0040.01220.38
8.2.100.0080.00417.78
8.2.90.0100.00418.13
8.2.80.0090.00518.37
8.2.70.0080.00518.06
8.2.60.0050.00918.40
8.2.50.0090.00518.94
8.2.40.0100.00318.49
8.2.30.0060.00618.40
8.2.20.0050.00818.14
8.2.10.0050.00718.58
8.2.00.0060.00618.58
8.1.300.0030.00519.50
8.1.290.0040.00418.88
8.1.280.0190.00325.92
8.1.270.0080.00024.66
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0100.00023.85
8.1.230.0070.00420.80
8.1.220.0100.00418.25
8.1.210.0090.00318.83
8.1.200.0090.00518.06
8.1.190.0070.00218.75
8.1.180.0080.00518.43
8.1.170.0060.00719.71
8.1.160.0060.00618.79
8.1.150.0060.00618.36
8.1.140.0070.00618.37
8.1.130.0080.00517.90
8.1.120.0100.00417.90
8.1.110.0050.00817.88
8.1.100.0090.00517.88
8.1.90.0090.00517.92
8.1.80.0110.00317.92
8.1.70.0090.00517.92
8.1.60.0090.00417.87
8.1.50.0080.00717.73
8.1.40.0070.00717.76
8.1.30.0120.00517.82
8.1.20.0090.00717.81
8.1.10.0100.00617.71
8.1.00.0110.00417.93
8.0.300.0030.00520.81
8.0.290.0030.00917.76
8.0.280.0020.01018.64
8.0.270.0100.00317.46
8.0.260.0060.00617.46
8.0.250.0060.00717.53
8.0.240.0070.00517.50
8.0.230.0090.00417.54
8.0.220.0070.00417.48
8.0.210.0100.00317.51
8.0.200.0100.00317.54
8.0.190.0070.00617.34
8.0.180.0110.00517.26
8.0.170.0090.00617.33
8.0.160.0110.00417.19
8.0.150.0110.00517.17
8.0.140.0090.00517.16
8.0.130.0120.00216.54
8.0.120.0110.00417.24
8.0.110.0100.00317.23
8.0.100.0060.00717.21
8.0.90.0060.00817.18
8.0.80.0090.00617.15
8.0.70.0080.00517.20
8.0.60.0060.00617.17
8.0.50.0110.00117.21
8.0.30.0130.00317.28
8.0.20.0090.00617.28
8.0.10.0080.00417.36
8.0.00.0070.00817.23
7.4.330.0070.00317.08
7.4.320.0060.00717.43
7.4.300.0120.00117.54
7.4.290.0110.00417.00
7.4.280.0100.00517.05
7.4.270.0090.00617.07
7.4.260.0080.00617.02
7.4.250.0080.00617.03
7.4.240.0100.00317.04
7.4.230.0080.00617.04
7.4.220.0090.00317.04
7.4.210.0080.00616.92
7.4.200.0110.00217.06
7.4.190.0070.00917.17
7.4.180.0130.00417.16
7.4.160.0130.00316.81
7.4.150.0130.00217.16
7.4.140.0110.00717.41
7.4.130.0090.00717.02
7.4.120.0120.00517.01
7.4.110.0090.00717.02
7.4.100.0090.00817.01
7.4.90.0140.00516.86
7.4.80.0150.00517.43
7.4.70.0140.00516.91
7.4.60.0110.00816.93
7.4.50.0140.00516.85
7.4.40.0110.00716.83
7.4.30.0120.00716.95
7.4.20.0170.00516.94
7.4.10.0140.00816.90
7.4.00.0110.00616.92
7.3.330.0100.00416.23
7.3.320.0090.00416.15
7.3.310.0110.00316.80
7.3.300.0090.00516.83
7.3.290.0100.00416.81
7.3.280.0080.00816.87
7.3.270.0120.00416.99
7.3.260.0120.00616.53
7.3.250.0110.00517.02
7.3.240.0090.00716.62
7.3.230.0100.00616.80
7.3.220.0130.00316.94
7.3.210.0130.00816.69
7.3.200.0150.00316.65
7.3.190.0150.00516.78
7.3.180.0130.00716.75
7.3.170.0130.00716.74
7.3.160.0130.00716.71
7.3.150.0160.00416.86
7.3.140.0140.00716.67
7.3.130.0180.00416.64
7.3.120.0180.00516.71
7.3.110.0170.00516.67
7.3.100.0110.01016.63
7.3.90.0150.00716.75
7.3.80.0130.00716.71
7.3.70.0150.00516.69
7.3.60.0110.00816.39
7.3.50.0130.00516.33
7.3.40.0100.00816.43
7.3.30.0140.00716.33
7.3.20.0150.00917.40
7.3.10.0220.00817.31
7.3.00.0150.01017.35
7.2.340.0120.00316.92
7.2.330.0120.00616.70
7.2.320.0130.00616.79
7.2.310.0130.00716.74
7.2.300.0130.00716.74
7.2.290.0160.00416.82
7.2.280.0160.00516.82
7.2.270.0150.00716.66
7.2.260.0180.00416.73
7.2.250.0170.00416.72
7.2.240.0170.00516.70
7.2.230.0160.00616.74
7.2.220.0140.00716.69
7.2.210.0150.00616.73
7.2.200.0150.00716.82
7.2.190.0150.00616.50
7.2.180.0150.00316.40
7.2.170.0130.00616.46
7.2.160.0150.00516.49
7.2.150.0190.01117.45
7.2.140.0190.00817.50
7.2.130.0150.00617.54
7.2.120.0170.00817.54
7.2.110.0140.00717.51
7.2.100.0140.00717.59
7.2.90.0130.00717.46
7.2.80.0150.00917.48
7.2.70.0140.00817.58
7.2.60.0150.00617.56
7.2.50.0190.00517.53
7.2.40.0150.00617.59
7.2.30.0190.00517.63
7.2.20.0140.00617.59
7.2.10.0150.00817.55
7.2.00.0120.00617.56
7.1.330.0100.00816.65
7.1.320.0140.00416.72
7.1.310.0120.00716.73
7.1.300.0110.00616.50
7.1.290.0110.00716.51
7.1.280.0110.00616.53
7.1.270.0140.00816.57
7.1.260.0130.00716.55
7.1.250.0090.00816.45
7.1.240.0100.00716.72
7.1.230.0130.00516.71
7.1.220.0090.00916.71
7.1.210.0150.00616.71
7.1.200.0130.00616.65
7.1.190.0100.00616.71
7.1.180.0120.00716.75
7.1.170.0120.00616.72
7.1.160.0090.00816.69
7.1.150.0130.00616.70
7.1.140.0110.00716.77
7.1.130.0160.00816.68
7.1.120.0110.00616.70
7.1.110.0150.00316.67
7.1.100.0120.00616.71
7.1.90.0120.00616.66
7.1.80.0130.00416.72
7.1.70.0120.00616.63
7.1.60.0130.00516.67
7.1.50.0130.00416.70
7.1.40.0090.00816.73
7.1.30.0140.00616.70
7.1.20.0120.00516.58
7.1.10.0100.00716.64
7.1.00.0150.00416.63

preferences:
27.89 ms | 403 KiB | 5 Q