3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "ABwerty45^&*jk", "ABwerrtty", "LF%$^erftgt5234", "TABYR56H", "ab7877", "Abtyu7" ]; $arr = ['AB', 'DC', 'LF']; foreach ($strings as $string) { $match = in_array(substr($string, 0, 2), $arr); echo $match ? "Match: $string" . PHP_EOL : "No match: $string" . PHP_EOL; }

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.0100.01016.63
8.3.60.0090.00616.63
8.3.50.0120.00716.49
8.3.40.0150.00018.79
8.3.30.0000.01418.64
8.3.20.0120.00021.77
8.3.10.0040.00423.54
8.3.00.0050.00319.68
8.2.190.0130.00716.58
8.2.180.0100.01018.46
8.2.170.0090.00522.96
8.2.160.0070.00722.07
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00420.94
8.2.110.0000.00921.00
8.2.100.0060.00617.91
8.2.90.0000.00917.49
8.2.80.0070.00317.97
8.2.70.0040.00417.62
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0050.00317.96
8.2.30.0000.00718.07
8.2.20.0040.00418.05
8.2.10.0000.00817.81
8.2.00.0070.00018.11
8.1.280.0110.00425.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.84
8.1.230.0110.00022.68
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0040.00417.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.61
8.1.160.0030.00518.89
8.1.150.0040.00419.00
8.1.140.0000.00717.60
8.1.130.0070.00019.01
8.1.120.0040.00417.35
8.1.110.0000.00717.34
8.1.100.0050.00217.50
8.1.90.0030.00317.35
8.1.80.0000.00817.34
8.1.70.0040.00417.45
8.1.60.0040.00417.57
8.1.50.0000.00817.40
8.1.40.0000.00717.41
8.1.30.0070.00017.54
8.1.20.0000.00717.56
8.1.10.0030.00717.52
8.1.00.0000.00717.45
8.0.300.0040.00419.91
8.0.290.0050.00316.75
8.0.280.0030.00318.37
8.0.270.0000.00717.18
8.0.260.0070.00516.71
8.0.250.0070.00016.84
8.0.240.0050.00316.95
8.0.230.0030.00316.81
8.0.220.0030.00316.79
8.0.210.0000.00716.89
8.0.200.0000.00716.81
8.0.190.0110.00016.93
8.0.180.0030.00316.86
8.0.170.0060.00316.87
8.0.160.0050.00216.78
8.0.150.0000.00716.81
8.0.140.0060.00316.88
8.0.130.0060.00013.25
8.0.120.0050.00316.92
8.0.110.0070.00016.76
8.0.100.0030.00516.74
8.0.90.0050.00216.85
8.0.80.0070.00716.80
8.0.70.0030.00616.76
8.0.60.0040.00416.69
8.0.50.0000.00716.98
8.0.30.0110.00617.04
8.0.20.0130.00517.44
8.0.10.0000.00817.01
8.0.00.0080.00916.90
7.4.330.0000.00515.55
7.4.320.0000.00616.52
7.4.300.0000.00616.57
7.4.290.0030.00316.39
7.4.280.0040.00416.52
7.4.270.0030.00316.59
7.4.260.0070.00016.48
7.4.250.0030.00316.55
7.4.240.0030.00316.60
7.4.230.0040.00416.57
7.4.220.0040.00416.45
7.4.210.0070.00816.59
7.4.200.0030.00316.71
7.4.160.0080.00816.43
7.4.140.0100.00917.86
7.4.130.0090.00916.73
7.4.120.0110.00816.50
7.4.110.0070.01616.41
7.4.100.0070.01516.52
7.4.90.0030.01316.53
7.4.80.0090.00919.39
7.4.70.0100.00716.31
7.4.60.0030.01616.41
7.4.50.0130.00316.48
7.4.40.0100.00616.50
7.4.10.0080.00815.07
7.4.00.0080.01014.83
7.3.330.0050.00013.15
7.3.320.0000.00513.04
7.3.310.0000.00616.34
7.3.300.0040.00416.36
7.3.290.0000.00716.17
7.3.280.0060.01116.28
7.3.260.0080.01316.43
7.3.240.0090.00816.42
7.3.230.0060.01216.34
7.3.210.0100.00716.47
7.3.200.0070.01116.71
7.3.190.0120.00316.39
7.3.180.0030.01716.28
7.3.170.0120.00316.30
7.3.160.0130.00316.37
7.3.130.0090.00915.07
7.3.120.0100.00715.07
7.3.110.0030.01315.07
7.3.100.0060.00615.07
7.3.90.0030.01215.07
7.3.80.0000.01415.07
7.3.70.0060.01015.07
7.3.60.0000.00915.07
7.3.50.0100.00315.07
7.3.40.0000.01015.07
7.3.30.0000.01515.07
7.3.20.0060.00616.74
7.3.10.0110.00016.70
7.3.00.0070.00416.54
7.2.330.0120.00616.68
7.2.320.0130.00416.74
7.2.310.0080.01216.66
7.2.300.0100.00616.36
7.2.290.0190.00316.56
7.2.260.0090.00615.07
7.2.250.0090.00915.07
7.2.240.0060.00915.07
7.2.230.0100.00615.07
7.2.220.0000.01615.07
7.2.210.0040.01115.07
7.2.200.0140.00315.13
7.2.190.0040.01115.07
7.2.180.0060.01015.25
7.2.170.0070.00715.07
7.2.160.0090.00615.07
7.2.150.0030.00716.75
7.2.140.0070.00716.93
7.2.130.0040.00816.94
7.2.120.0030.01316.68
7.2.110.0060.01216.71
7.2.100.0030.01016.87
7.2.90.0090.00317.16
7.2.80.0040.01116.99
7.2.70.0110.00416.95
7.2.60.0040.01016.87
7.2.50.0030.01016.88
7.2.40.0080.00816.98
7.2.30.0130.00517.49
7.2.20.0140.00817.52
7.2.10.0110.00917.21
7.2.00.0140.00917.36
7.1.330.0070.00715.77
7.1.320.0040.00415.84
7.1.310.0030.01015.76
7.1.300.0110.00315.88
7.1.290.0000.01015.80
7.1.280.0070.00315.94
7.1.270.0060.00315.67
7.1.260.0030.01015.65
7.1.250.0000.01415.82
7.1.240.0030.01015.77
7.1.230.0040.01115.85
7.1.220.0070.00715.59
7.1.210.0080.00315.69
7.1.200.0070.00515.87
7.1.190.0030.01516.02
7.1.180.0040.00715.54
7.1.170.0060.00915.56
7.1.160.0000.01415.82
7.1.150.0090.01116.28
7.1.140.0110.00815.99
7.1.130.0090.01316.36
7.1.120.0070.01216.07
7.1.110.0140.00815.95
7.1.100.0120.00815.68
7.1.90.0110.01215.94
7.1.80.0120.00815.94
7.1.70.0100.01215.69
7.1.60.0230.01524.51
7.1.50.0220.01024.31
7.1.40.0180.01024.12
7.1.30.0190.01024.24
7.1.20.0190.01624.21
7.1.10.0090.00715.16
7.1.00.0060.01015.25
7.0.330.0080.00015.36
7.0.320.0000.01215.30
7.0.310.0000.01415.36
7.0.300.0080.00615.35
7.0.290.0040.01215.51
7.0.280.0040.00415.40
7.0.270.0040.00815.21
7.0.260.0060.01015.40
7.0.250.0030.00915.42
7.0.240.0080.00415.37
7.0.230.0050.00315.44
7.0.220.0140.00015.12
7.0.210.0030.01015.54
7.0.200.0030.01315.38
7.0.190.0090.00615.57
7.0.180.0040.00715.59
7.0.170.0040.00815.41
7.0.160.0040.00715.16
7.0.150.0040.00715.41
7.0.140.0040.00815.64
7.0.130.0070.00415.43
7.0.120.0070.00715.26
7.0.110.0000.00815.40
7.0.100.0110.00315.48
7.0.90.0080.00415.29
7.0.80.0100.00315.35
7.0.70.0070.00615.30
7.0.60.0030.00915.27
7.0.50.0100.00315.65
7.0.40.0000.01115.07
7.0.30.0060.00315.07
7.0.20.0070.00715.07
7.0.10.0000.00815.07
7.0.00.0090.00015.07
5.6.400.0030.00915.07
5.6.390.0110.00015.07
5.6.380.0000.01515.07
5.6.370.0060.01315.07
5.6.360.0030.01415.07
5.6.350.0060.00315.07
5.6.340.0060.00315.07
5.6.330.0130.00315.07
5.6.320.0070.00715.07
5.6.310.0000.01215.07
5.6.300.0090.00315.07
5.6.290.0060.00615.07
5.6.280.0060.00615.07
5.6.270.0070.00715.07
5.6.260.0070.00715.07
5.6.250.0040.00715.07
5.6.240.0030.00715.07
5.6.230.0040.01115.07
5.6.220.0110.00015.07
5.6.210.0000.00815.07
5.6.200.0070.00415.07
5.6.190.0070.00715.07
5.6.180.0060.00915.07
5.6.170.0060.00615.07
5.6.160.0070.01015.07
5.6.150.0120.00315.07
5.6.140.0080.00615.07
5.6.130.0080.00315.07
5.6.120.0040.01015.07
5.6.110.0000.01715.07
5.6.100.0030.01315.07
5.6.90.0030.00615.07
5.6.80.0110.00415.07
5.6.70.0000.01315.07
5.6.60.0000.01115.07
5.6.50.0090.00615.07
5.6.40.0060.00315.07
5.6.30.0060.00615.07
5.6.20.0030.01015.07
5.6.10.0040.01115.07
5.6.00.0030.00615.07

preferences:
44.43 ms | 401 KiB | 5 Q