3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '123r4@#$ABCFG3478&*'; if (preg_match('/[a-z]/i', $string, $match)) { $firstLetter = $match[0]; } else { // there's no letters in string } echo $firstLetter;

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.0060.00918.27
8.3.50.0050.01722.17
8.3.40.0070.01418.92
8.3.30.0110.00419.21
8.3.20.0070.00020.34
8.3.10.0080.00023.57
8.3.00.0000.00719.27
8.2.180.0090.00616.88
8.2.170.0130.00722.96
8.2.160.0140.00722.29
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00021.18
8.2.110.0060.00322.24
8.2.100.0110.00017.97
8.2.90.0040.00417.88
8.2.80.0000.00819.09
8.2.70.0000.00817.93
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0030.00621.09
8.2.30.0070.00019.20
8.2.20.0070.00017.88
8.2.10.0040.00418.03
8.2.00.0040.00417.80
8.1.280.0100.00725.92
8.1.270.0090.00019.00
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00017.61
8.1.230.0040.00817.96
8.1.220.0030.00617.76
8.1.210.0000.00918.77
8.1.200.0000.00817.25
8.1.190.0040.00417.38
8.1.180.0070.00018.10
8.1.170.0000.00818.71
8.1.160.0050.00319.02
8.1.150.0070.00018.71
8.1.140.0040.00417.44
8.1.130.0000.00717.88
8.1.120.0050.00217.53
8.1.110.0040.00417.45
8.1.100.0000.00717.42
8.1.90.0030.00317.56
8.1.80.0030.00517.50
8.1.70.0000.00717.56
8.1.60.0000.00917.63
8.1.50.0040.00417.67
8.1.40.0030.00517.63
8.1.30.0060.00317.62
8.1.20.0000.00817.71
8.1.10.0000.00717.61
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0030.00317.17
8.0.260.0060.00017.22
8.0.250.0030.00317.09
8.0.240.0000.00717.02
8.0.230.0000.00717.04
8.0.220.0030.00316.83
8.0.210.0030.00516.92
8.0.200.0000.00716.94
8.0.190.0070.00017.07
8.0.180.0070.00016.95
8.0.170.0080.00017.00
8.0.160.0000.00716.90
8.0.150.0070.00016.91
8.0.140.0000.00716.94
8.0.130.0060.00013.45
8.0.120.0030.00516.88
8.0.110.0040.00416.81
8.0.100.0030.00516.82
8.0.90.0040.00416.93
8.0.80.0080.00817.02
8.0.70.0050.00216.87
8.0.60.0000.00716.96
8.0.50.0050.00217.03
8.0.30.0090.01317.30
8.0.20.0100.00917.48
8.0.10.0040.00416.89
8.0.00.0080.01116.72
7.4.330.0020.00215.03
7.4.320.0030.00316.66
7.4.300.0030.00316.64
7.4.290.0000.00716.66
7.4.280.0070.00316.76
7.4.270.0060.00016.54
7.4.260.0000.00816.64
7.4.250.0000.00716.62
7.4.240.0020.00516.62
7.4.230.0030.00316.39
7.4.220.0070.01516.80
7.4.210.0060.00916.68
7.4.200.0040.00416.80
7.4.160.0030.01216.65
7.4.150.0030.01817.40
7.4.140.0050.01217.86
7.4.130.0130.00316.57
7.4.120.0140.00616.75
7.4.110.0120.01516.47
7.4.100.0090.01516.64
7.4.90.0130.00316.76
7.4.80.0110.00619.39
7.4.70.0040.01316.81
7.4.60.0140.00616.49
7.4.50.0000.00516.70
7.4.40.0100.01016.76
7.4.30.0140.00716.62
7.4.00.0090.00715.08
7.3.330.0060.00013.32
7.3.320.0020.00213.31
7.3.310.0070.00016.39
7.3.300.0040.00416.41
7.3.290.0100.00416.39
7.3.280.0110.00516.41
7.3.270.0070.01117.40
7.3.260.0070.01016.94
7.3.250.0080.00816.57
7.3.240.0100.00716.71
7.3.230.0100.00716.73
7.3.210.0060.01116.55
7.3.200.0100.00719.39
7.3.190.0060.01216.66
7.3.180.0100.00716.54
7.3.170.0170.00616.59
7.3.160.0090.00616.71
7.3.120.0070.00915.00
7.3.110.0080.00714.94
7.3.100.0060.00814.81
7.3.90.0050.00915.04
7.3.80.0060.00714.97
7.3.70.0070.00814.77
7.3.60.0070.00715.01
7.3.50.0080.00615.04
7.3.40.0080.00814.91
7.3.30.0070.00614.94
7.3.20.0060.00916.72
7.3.10.0100.00516.78
7.3.00.0080.00616.76
7.2.330.0120.00616.81
7.2.320.0100.00616.57
7.2.310.0090.00816.72
7.2.300.0040.01216.63
7.2.290.0090.01016.76
7.2.250.0120.00815.27
7.2.240.0090.01115.08
7.2.230.0010.01114.94
7.2.220.0070.00615.04
7.2.210.0050.01015.21
7.2.200.0080.00815.18
7.2.190.0070.00715.08
7.2.180.0060.00815.05
7.2.170.0040.01215.20
7.2.60.0030.00916.95
7.2.00.0000.01219.79
7.1.330.0060.01015.94
7.1.320.0050.00715.84
7.1.310.0070.00715.86
7.1.300.0040.01015.86
7.1.290.0060.00915.93
7.1.280.0070.00715.82
7.1.270.0060.00815.95
7.1.260.0060.00716.04
7.1.200.0070.00315.71
7.1.100.0070.00717.95
7.1.70.0060.00316.96
7.1.60.0070.01319.22
7.1.50.0040.01116.83
7.1.00.0070.07722.26
7.0.200.0030.00717.08
7.0.140.0030.07322.01
7.0.60.0200.03720.02
7.0.50.0000.05317.90
7.0.40.0130.05320.41
7.0.30.0270.06720.20
7.0.20.0330.07320.14
7.0.10.0030.04320.03
7.0.00.0100.08720.01
5.6.280.0070.06721.11
5.6.210.0030.08720.50
5.6.200.0230.05018.15
5.6.190.0130.07320.27
5.6.180.0270.05720.64
5.6.170.0230.04720.48
5.6.160.0100.08320.46
5.6.150.0030.07018.09
5.6.140.0130.07318.18
5.6.130.0070.04718.14
5.6.120.0030.04721.11
5.6.110.0100.08721.10
5.6.100.0070.06020.98
5.6.90.0100.08320.98
5.6.80.0070.04320.53
5.5.350.3870.03020.40
5.5.340.0000.06318.02
5.5.330.0030.04720.07
5.5.320.2730.04720.20
5.5.310.1070.03720.50
5.5.300.0030.05018.02
5.5.290.0030.07018.05
5.5.280.0000.07320.77
5.5.270.0000.05320.79
5.5.260.0000.09020.87
5.5.250.0070.05320.68
5.5.240.0070.04320.27
5.4.450.0830.05019.63
5.4.440.0700.05319.52
5.4.430.0070.05719.18
5.4.420.0570.05319.14
5.4.410.0200.04319.20
5.4.400.0600.04718.82
5.4.390.0170.06318.62
5.4.380.0330.05318.50
5.4.370.0370.05018.66
5.4.360.0230.05718.53
5.4.350.0370.05318.70
5.4.340.0400.04318.68
5.4.320.0330.08018.61
5.4.310.0470.06718.50
5.4.300.0230.06318.55
5.4.290.0470.06318.68
5.4.280.0300.07018.71
5.4.270.0370.05718.46
5.4.260.0300.05318.69
5.4.250.0300.05318.66
5.4.240.0330.06018.61
5.4.230.0400.05718.74
5.4.220.0370.05018.48
5.4.210.0200.06018.65
5.4.200.0300.06316.56
5.4.190.0300.07718.74
5.4.180.0470.06318.60
5.4.170.0400.07018.56
5.4.160.0500.06718.67
5.4.150.0700.04718.55
5.4.140.0330.06716.08
5.4.130.0370.07016.09
5.4.120.0470.06016.23
5.4.110.0300.04716.22
5.4.100.0200.05716.34
5.4.90.0300.05316.24
5.4.80.0430.04016.33
5.4.70.0400.05016.27
5.4.60.0400.05316.05
5.4.50.0300.05316.02
5.4.40.0270.06016.12
5.4.30.0330.05016.04
5.4.20.0430.05716.28
5.4.10.0300.06016.20
5.4.00.0300.05015.67
5.3.290.0270.06714.73
5.3.280.0400.07014.64
5.3.270.0370.06014.59
5.3.260.0300.06014.70
5.3.250.0400.05314.70
5.3.240.0400.05014.70
5.3.230.0370.05014.54
5.3.220.0300.05314.46
5.3.210.0400.04714.51
5.3.200.0230.07714.55
5.3.190.0400.05014.59
5.3.180.0270.05714.61
5.3.170.0370.08014.63
5.3.160.0400.05714.63
5.3.150.0300.06014.57
5.3.140.0300.06314.55
5.3.130.0400.05714.47
5.3.120.0270.05714.46
5.3.110.0400.05014.49
5.3.100.0230.06013.93
5.3.90.0270.05713.96
5.3.80.0200.06313.99
5.3.70.0230.05313.95
5.3.60.0330.04713.95
5.3.50.0370.05713.85
5.3.40.0230.05713.90
5.3.30.0430.04713.82
5.3.20.0270.06013.76
5.3.10.0400.05713.66
5.3.00.0330.05713.72
5.2.170.0300.04311.12
5.2.160.0270.04011.09
5.2.150.0230.04311.28
5.2.140.0300.04711.05
5.2.130.0200.04711.07
5.2.120.0400.02311.14
5.2.110.0400.03011.09
5.2.100.0230.04711.24
5.2.90.0400.04011.11
5.2.80.0330.04011.13
5.2.70.0200.05011.04
5.2.60.0330.05310.96
5.2.50.0330.04711.05
5.2.40.0230.05311.00
5.2.30.0170.05310.93
5.2.20.0370.03710.99
5.2.10.0200.03710.82
5.2.00.0230.03310.68
5.1.60.0170.0339.99
5.1.50.0300.03010.01
5.1.40.0400.0309.97
5.1.30.0200.03310.38
5.1.20.0170.04310.44
5.1.10.0330.02710.08
5.1.00.0200.04310.04
5.0.50.0070.0338.53
5.0.40.0170.0238.40
5.0.30.0170.0478.33
5.0.20.0100.0308.21
5.0.10.0170.0278.29
5.0.00.0100.0438.19
4.4.90.0100.0205.94
4.4.80.0100.0335.90
4.4.70.0170.0175.86
4.4.60.0130.0235.82
4.4.50.0130.0175.90
4.4.40.0170.0375.91
4.4.30.0170.0305.85
4.4.20.0270.0175.97
4.4.10.0200.0135.88
4.4.00.0170.0335.95
4.3.110.0170.0205.85
4.3.100.0130.0175.80
4.3.90.0170.0175.79
4.3.80.0100.0335.81
4.3.70.0100.0275.87
4.3.60.0070.0235.82
4.3.50.0130.0235.86
4.3.40.0100.0375.76
4.3.30.0070.0204.55
4.3.20.0030.0234.58
4.3.10.0100.0234.55
4.3.00.0130.0276.70

preferences:
49.37 ms | 401 KiB | 5 Q