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) ?: similar_text($needle, $b) <=> similar_text($needle, $a) ); 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.3.60.0000.01518.30
8.3.50.0110.00716.13
8.3.40.0140.00718.68
8.3.30.0070.00718.69
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.180.0110.00725.92
8.2.170.0070.00719.00
8.2.160.0070.00722.96
8.2.150.0050.00225.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0040.00721.08
8.2.100.0060.00617.84
8.2.90.0030.00517.84
8.2.80.0040.00420.17
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0050.00318.05
8.2.40.0040.00418.25
8.2.30.0040.00418.09
8.2.20.0070.00018.31
8.2.10.0040.00419.44
8.2.00.0000.00719.34
8.1.280.0120.00325.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00022.14
8.1.230.0040.00720.85
8.1.220.0030.00517.76
8.1.210.0080.00018.95
8.1.200.0030.00717.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00818.53
8.1.160.0000.00818.91
8.1.150.0070.00018.90
8.1.140.0040.00418.91
8.1.130.0040.00417.46
8.1.120.0070.00017.50
8.1.110.0000.00817.46
8.1.100.0040.00417.52
8.1.90.0040.00417.47
8.1.80.0040.00417.48
8.1.70.0070.00017.45
8.1.60.0050.00317.46
8.1.50.0050.00317.58
8.1.40.0040.00417.55
8.1.30.0000.00817.53
8.1.20.0030.00517.52
8.1.10.0030.00617.39
8.1.00.0100.00417.36
8.0.300.0000.00720.14
8.0.290.0040.00416.75
8.0.280.0030.00318.45
8.0.270.0030.00318.12
8.0.260.0030.00316.95
8.0.250.0050.00216.90
8.0.240.0070.00017.09
8.0.230.0030.00416.89
8.0.220.0030.00316.93
8.0.210.0020.00516.92
8.0.200.0060.00016.85
8.0.190.0030.00616.97
8.0.180.0040.00816.94
8.0.170.0090.00016.95
8.0.160.0040.00416.90
8.0.150.0000.00716.85
8.0.140.0000.00716.88
8.0.130.0020.00615.09
8.0.120.0130.00116.77
8.0.110.0110.00316.84
8.0.100.0090.00516.88
8.0.90.0090.00516.86
8.0.80.0150.00716.74
8.0.70.0090.01016.76
8.0.60.0140.00316.84
8.0.50.0130.00516.79
8.0.30.0110.00616.77
8.0.20.0080.01216.90
8.0.10.0080.01316.98
8.0.00.0090.01117.04
7.4.330.0040.00015.55
7.4.320.0070.00016.52
7.4.300.0000.00716.51
7.4.290.0030.00716.57
7.4.280.0040.00416.60
7.4.270.0040.00516.54
7.4.260.0140.00214.84
7.4.250.0160.00116.52
7.4.240.0130.00416.47
7.4.230.0120.00416.44
7.4.220.0100.00316.47
7.4.210.0150.00516.55
7.4.200.0130.01116.63
7.4.190.0130.00916.52
7.4.180.0180.00616.58
7.4.160.0110.00816.58
7.4.150.0110.00716.50
7.4.140.0120.00616.50
7.4.130.0120.00516.51
7.4.120.0140.01216.47
7.4.110.0140.00416.52
7.4.100.0110.00616.51
7.4.90.0160.00616.37
7.4.80.0110.00816.42
7.4.70.0100.00816.53
7.4.60.0150.00516.44
7.4.50.0100.01016.31
7.4.40.0140.00516.34
7.4.30.0120.00716.41
7.4.20.0130.00516.44
7.4.10.0130.00516.47
7.4.00.0080.00816.47
7.3.330.0080.00616.01
7.3.320.0100.00314.64
7.3.310.0120.00216.13
7.3.300.0070.00616.17
7.3.290.0140.00516.20
7.3.280.0060.01216.21
7.3.270.0110.00616.14
7.3.260.0120.00916.08
7.3.250.0110.00816.19
7.3.240.0140.00516.07
7.3.230.0110.00716.05
7.3.220.0150.00916.14
7.3.210.0140.00516.04
7.3.200.0100.00916.05
7.3.190.0090.00816.14
7.3.180.0100.01316.10
7.3.170.0120.00716.10
7.3.160.0120.01015.99
7.3.150.0150.00516.07
7.3.140.0160.00516.14
7.3.130.0100.00616.15
7.3.120.0150.01216.13
7.3.110.0120.00716.05
7.3.100.0130.00815.99
7.3.90.0160.00516.30
7.3.80.0130.00816.08
7.3.70.0140.00616.18
7.3.60.0130.00716.21
7.3.50.0140.00616.15
7.3.40.0120.00716.22
7.3.30.0150.00516.14
7.3.20.0150.00517.12
7.3.10.0120.00817.14
7.3.00.0130.00717.15

preferences:
64.11 ms | 400 KiB | 5 Q