3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = "Hello how are you doing"; $string2 = " hi, how are you"; $words1 = str_word_count($string1, 1); $words2 = str_word_count($string2, 1); var_export( count(array_intersect($words1, $words2)) / count($words1) * 100 );

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.4.140.0140.00917.32
8.4.130.0150.00619.10
8.4.120.0370.01217.66
8.4.110.0410.00717.49
8.4.100.0400.01017.78
8.4.90.0440.00717.69
8.4.80.0370.00817.62
8.4.70.0400.00917.52
8.4.60.0340.01017.89
8.4.50.0360.00717.73
8.4.40.0430.00717.49
8.4.30.0430.00917.34
8.4.20.0380.00917.53
8.4.10.0420.01017.49
8.3.260.0130.00716.38
8.3.250.0430.00816.15
8.3.240.0280.00916.58
8.3.230.0300.00316.30
8.3.220.0520.01016.33
8.3.210.0260.00616.63
8.3.200.0210.00516.47
8.3.190.0340.00816.55
8.3.180.0180.00616.66
8.3.170.0210.00416.42
8.3.160.0210.00516.23
8.3.150.0270.00816.53
8.3.140.0200.00416.41
8.3.130.0190.00216.27
8.3.120.0220.00816.44
8.3.110.0380.01016.18
8.3.100.0450.00816.31
8.3.90.0250.01016.14
8.3.80.0210.00316.45
8.3.70.0200.00416.26
8.3.60.0250.00916.37
8.3.50.0250.00716.56
8.3.40.0260.00417.62
8.3.30.0330.00517.49
8.3.20.0320.00917.48
8.3.10.0390.00717.27
8.3.00.0120.01117.33
8.2.290.0330.00616.72
8.2.280.0210.00616.77
8.2.270.0310.00516.36
8.2.260.0360.00716.28
8.2.250.0230.00716.19
8.2.240.0210.00416.38
8.2.230.0250.00416.07
8.2.220.0170.00316.52
8.2.210.0190.00316.34
8.2.200.0170.00316.54
8.2.190.0160.00416.29
8.2.180.0170.00316.29
8.2.170.0290.00817.32
8.2.160.0340.00417.82
8.2.150.0350.01017.54
8.2.140.0390.00617.36
8.2.130.0390.00617.38
8.2.120.0410.00517.38
8.2.110.0370.00617.46
8.2.100.0420.00717.48
8.2.90.0340.01017.71
8.2.80.0320.01117.50
8.2.70.0360.00717.57
8.2.60.0210.00517.64
8.2.50.0370.00617.43
8.2.40.0390.01017.46
8.2.30.0290.00717.26
8.2.20.0310.00517.24
8.2.10.0330.00817.50
8.2.00.0350.00717.57

preferences:
44.76 ms | 403 KiB | 5 Q