3v4l.org

run code in 300+ PHP versions simultaneously
<?php function length(string $str): int { return 0; } $data = ['hello', 'world']; usort($data, 'length'); // works usort($data, 'strlen'); // does not work

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.70.0070.01516.58
8.3.60.0090.00618.43
8.3.50.0120.00618.09
8.3.40.0120.00618.79
8.3.30.0040.01118.88
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.190.0110.00716.63
8.2.180.0070.01125.92
8.2.170.0060.00919.04
8.2.160.0100.00322.96
8.2.150.0000.00925.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0180.00019.16
8.2.110.0030.00622.29
8.2.100.0090.00317.72
8.2.90.0050.00317.75
8.2.80.0050.00318.86
8.2.70.0050.00317.50
8.2.60.0000.00817.34
8.2.50.0040.00418.05
8.2.40.0120.00017.63
8.2.30.0000.00817.73
8.2.20.0030.00420.49
8.2.10.0000.00717.78
8.2.00.0100.00019.22
8.1.280.0000.01525.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00618.98
8.1.230.0070.00417.83
8.1.220.0000.00917.76
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0000.00819.07
8.1.150.0040.00418.48
8.1.140.0070.00017.29
8.1.130.0030.00318.82
8.1.120.0040.00417.30
8.1.110.0040.00417.30
8.1.100.0070.00017.36
8.1.90.0040.00417.41
8.1.80.0060.00317.32
8.1.70.0040.00417.40
8.1.60.0030.00517.53
8.1.50.0050.00517.51
8.1.40.0030.00517.40
8.1.30.0000.00817.64
8.1.20.0000.00817.67
8.1.10.0000.00817.56
8.1.00.0050.00317.47
8.0.300.0040.00418.92
8.0.290.0060.00316.75
8.0.280.0070.00018.59
8.0.270.0030.00316.77
8.0.260.0000.00618.28
8.0.250.0000.00716.84
8.0.240.0030.00316.89
8.0.230.0030.00316.91
8.0.220.0030.00316.90
8.0.210.0000.00716.88
8.0.200.0070.00016.98
8.0.190.0040.00416.98
8.0.180.0040.00716.82
8.0.170.0000.00816.91
8.0.160.0000.00816.75
8.0.150.0030.00316.78
8.0.140.0040.00716.84
8.0.130.0110.00016.96
8.0.120.0140.00516.70
8.0.110.0090.00916.87
8.0.100.0140.00716.64
8.0.90.0140.00516.77
8.0.80.0130.00516.71
8.0.70.0100.01016.80
8.0.60.0100.00916.72
8.0.50.0150.00316.70
8.0.30.0130.00516.72
8.0.20.0110.00716.98
8.0.10.0090.00916.89
8.0.00.0060.00617.07
7.4.330.0050.00015.55
7.4.320.0030.00316.49
7.4.300.0000.00716.37
7.4.290.0020.00516.36
7.4.280.0030.00616.52
7.4.270.0030.00316.54
7.4.260.0150.00516.41
7.4.250.0200.00016.32
7.4.240.0200.00016.52
7.4.230.0130.00816.34
7.4.220.0190.00216.42
7.4.210.0170.00016.54
7.4.200.0100.00716.54
7.4.190.0160.00316.57
7.4.180.0120.00616.53
7.4.160.0150.00216.34
7.4.150.0150.00416.43
7.4.140.0170.00316.47
7.4.130.0150.00316.52
7.4.120.0120.00516.35
7.4.110.0130.00416.21
7.4.100.0090.00916.42
7.4.90.0130.00516.22
7.4.80.0150.00316.38
7.4.70.0070.01116.43
7.4.60.0120.00616.39
7.4.50.0080.01116.14
7.4.40.0180.00016.31
7.4.30.0150.00316.30
7.4.20.0140.00516.21
7.4.10.0160.00216.20
7.4.00.0120.00516.38
7.3.330.0170.00316.07
7.3.320.0180.00016.20
7.3.310.0130.00616.11
7.3.300.0100.01016.29
7.3.290.0150.00416.15
7.3.280.0160.00316.07
7.3.270.0160.00316.31
7.3.260.0160.00316.09
7.3.250.0130.00616.11
7.3.240.0110.00716.05
7.3.230.0120.00616.32
7.3.220.0100.00815.98
7.3.210.0130.00616.14
7.3.200.0160.00316.07
7.3.190.0130.00016.18
7.3.180.0160.00016.03
7.3.170.0160.00316.05
7.3.160.0190.00016.15
7.3.150.0180.00016.15
7.3.140.0120.00616.04
7.3.130.0150.00416.18
7.3.120.0090.00916.19
7.3.110.0110.00715.91
7.3.100.0140.00416.14
7.3.90.0180.00016.46
7.3.80.0150.00416.27
7.3.70.0180.00016.02
7.3.60.0110.00716.30
7.3.50.0200.00016.29
7.3.40.0200.00016.16
7.3.30.0090.00916.27
7.3.20.0180.00316.17
7.3.10.0180.00316.12
7.3.00.0140.00716.21

preferences:
45.03 ms | 401 KiB | 5 Q