3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testStrings = [ "H3||0", "Hallo", "aloha", "h", "hallo", "hallå", "hel", "helicopter", "hellacious", "hello", "hello y'all", "hello yall", "helów", "hey hello", "hola", "hêllo", "mellow yellow", "try", ]; $needle = 'hello'; usort($testStrings, fn($a, $b) => levenshtein($needle, $a) <=> levenshtein($needle, $b)); var_export($testStrings);

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.00.0130.00919.79
8.4.150.0030.00014.05
8.4.140.0060.01617.72
8.4.130.0150.00617.87
8.4.120.0100.01120.64
8.4.110.0090.01122.65
8.4.100.0130.00817.75
8.4.90.0080.01018.81
8.4.80.0130.00719.69
8.4.70.0050.00418.04
8.4.60.0110.01020.73
8.4.50.0120.00818.77
8.4.40.0170.00317.65
8.4.30.0030.01618.58
8.4.20.0160.00318.68
8.4.10.0090.00922.50
8.3.280.0140.00718.31
8.3.270.0080.01116.51
8.3.260.0110.00816.71
8.3.250.0110.00719.00
8.3.240.0050.00316.77
8.3.230.0120.00716.48
8.3.220.0040.00417.22
8.3.210.0120.00716.51
8.3.200.0030.00716.61
8.3.190.0090.01017.21
8.3.180.0110.00916.40
8.3.170.0060.00319.02
8.3.160.0070.01118.50
8.3.150.0050.00320.45
8.3.140.0060.00319.05
8.3.130.0000.00818.71
8.3.120.0000.00818.91
8.3.110.0090.00016.54
8.3.100.0070.00718.33
8.3.90.0050.00326.77
8.3.80.0030.00716.50
8.3.70.0070.01418.30
8.3.60.0170.00318.25
8.3.50.0150.00524.51
8.3.40.0190.00018.67
8.3.30.0100.00319.16
8.3.20.0000.00724.18
8.3.10.0060.00324.66
8.3.00.0060.00326.16
8.2.290.0080.01120.38
8.2.280.0100.01018.25
8.2.270.0140.00717.05
8.2.260.0000.00816.70
8.2.250.0090.00016.56
8.2.240.0030.00617.36
8.2.230.0040.00420.94
8.2.220.0060.00324.06
8.2.210.0060.00326.77
8.2.200.0090.00016.63
8.2.190.0140.00318.29
8.2.180.0120.00625.92
8.2.170.0150.00022.96
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.00
8.2.110.0030.00619.21
8.2.100.0090.00617.59
8.2.90.0040.00419.52
8.2.80.0090.00019.16
8.2.70.0060.00317.50
8.2.60.0000.00917.63
8.2.50.0040.00418.05
8.2.40.0000.00718.16
8.2.30.0000.00817.98
8.2.20.0070.00017.95
8.2.10.0070.00019.37
8.2.00.0050.00219.22
8.1.330.0100.01021.57
8.1.320.0100.01016.15
8.1.310.0060.01216.78
8.1.300.0120.00416.20
8.1.290.0100.00030.84
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.16
8.1.230.0040.00720.84
8.1.220.0000.00817.78
8.1.210.0000.00818.90
8.1.200.0060.00317.48
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0050.00220.66
8.1.150.0040.00418.77
8.1.140.0040.00418.89
8.1.130.0030.00320.08
8.1.120.0080.00017.38
8.1.110.0000.00717.50
8.1.100.0000.00717.35
8.1.90.0070.00017.43
8.1.80.0040.00417.47
8.1.70.0000.00717.38
8.1.60.0030.00617.50
8.1.50.0000.00817.55
8.1.40.0030.00617.49
8.1.30.0000.00717.56
8.1.20.0040.00417.49
8.1.10.0050.00317.43
8.1.00.0030.00517.32
8.0.300.0080.00019.94
8.0.290.0070.00316.75
8.0.280.0070.00018.36
8.0.270.0030.00318.13
8.0.260.0030.00320.23
8.0.250.0000.00717.05
8.0.240.0050.00316.91
8.0.230.0070.00016.98
8.0.220.0070.00316.95
8.0.210.0040.00416.88
8.0.200.0030.00316.99
8.0.190.0000.00816.91
8.0.180.0000.00816.90
8.0.170.0060.00316.92
8.0.160.0000.00716.87
8.0.150.0040.00416.80
8.0.140.0020.00516.83
8.0.130.0030.00415.11
8.0.120.0060.00116.86
8.0.110.0000.00816.85
8.0.100.0080.00116.80
8.0.90.0030.00516.88
8.0.80.0080.00416.90
8.0.70.0050.00216.82
8.0.60.0040.00416.82
8.0.50.0000.00716.85
8.0.30.0030.00916.95
8.0.20.0080.00516.82
8.0.10.0000.00816.89
8.0.00.0070.00716.82
7.4.330.0000.00515.55
7.4.320.0060.00016.60
7.4.300.0060.00016.63
7.4.290.0080.00016.51
7.4.280.0080.00016.60
7.4.270.0020.00516.56
7.4.260.0020.00414.88
7.4.250.0020.00516.55
7.4.240.0040.00416.55
7.4.230.0060.00216.53
7.4.220.0050.00216.48
7.4.210.0060.00916.53
7.4.200.0030.00316.53
7.4.190.0000.00716.55
7.4.180.0000.00816.42
7.4.160.0030.00316.58
7.4.150.0030.00316.46
7.4.140.0000.00616.35
7.4.130.0070.00916.54
7.4.120.0030.00316.32
7.4.110.0030.00316.26
7.4.100.0030.00316.49
7.4.90.0000.00616.26
7.4.80.0030.00316.34
7.4.70.0050.00316.39
7.4.60.0000.00716.26
7.4.50.0080.00416.19
7.4.40.0050.00516.35
7.4.30.0030.00816.45
7.4.20.0070.00716.17
7.4.10.0070.00516.49
7.4.00.0030.00816.50
7.3.330.0080.00616.09
7.3.320.0120.00214.45
7.3.310.0120.00216.08
7.3.300.0110.00315.96
7.3.290.0100.00516.15
7.3.280.0140.00716.17
7.3.270.0170.00316.24
7.3.260.0160.00716.17
7.3.250.0170.00316.25
7.3.240.0110.00916.22
7.3.230.0150.00416.07
7.3.220.0190.00016.09
7.3.210.0160.00415.95
7.3.200.0130.00415.83
7.3.190.0150.00415.91
7.3.180.0140.01016.16
7.3.170.0150.00716.15
7.3.160.0140.00316.05
7.3.150.0110.00516.31
7.3.140.0110.00916.15
7.3.130.0110.00616.18
7.3.120.0090.00816.15
7.3.110.0110.00616.12
7.3.100.0090.00816.01
7.3.90.0120.00416.13
7.3.80.0110.00716.25
7.3.70.0110.00616.16
7.3.60.0150.00416.05
7.3.50.0110.00516.17
7.3.40.0160.00116.24
7.3.30.0090.00816.14
7.3.20.0110.00717.16
7.3.10.0080.01017.18
7.3.00.0080.01117.11
7.2.340.0080.01216.14
7.2.330.0140.00716.00
7.2.320.0150.00416.10
7.2.310.0140.00516.15
7.2.300.0140.00516.02
7.2.290.0090.00916.01
7.2.280.0070.01016.33
7.2.270.0160.00516.12
7.2.260.0120.00516.20
7.2.250.0100.00616.06
7.2.240.0140.00316.16
7.2.230.0130.00716.30
7.2.220.0110.00616.14
7.2.210.0100.00616.21
7.2.200.0150.00316.23
7.2.190.0060.01116.25
7.2.180.0080.00916.29
7.2.170.0100.00716.34
7.2.160.0090.00816.32
7.2.150.0110.00817.26
7.2.140.0180.00017.26
7.2.130.0100.00717.32
7.2.120.0150.00217.31
7.2.110.0210.00517.28
7.2.100.0130.00417.21
7.2.90.0090.01117.36
7.2.80.0120.00617.09
7.2.70.0110.00717.29
7.2.60.0100.00817.26
7.2.50.0150.00317.23
7.2.40.0140.00517.26
7.2.30.0100.00817.29
7.2.20.0130.00517.19
7.2.10.0070.01117.17
7.2.00.0130.00517.32

preferences:
35.89 ms | 403 KiB | 5 Q