3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = "/^([a-zA-Z ,.]+)|\p{Han}+$/"; $tests = array( 'Mr Smith', 'Mr. Smith', 'Mr. 123 Smith', '姓名' ); foreach ($tests as $test) { if (preg_match($re, $test) !== 1) { echo $test . ' failed' . 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.60.0000.01518.40
8.3.50.0140.00622.98
8.3.40.0090.00618.96
8.3.30.0110.00319.04
8.3.20.0040.00420.34
8.3.10.0040.00423.51
8.3.00.0040.00419.63
8.2.180.0150.00416.88
8.2.170.0030.01722.96
8.2.160.0030.01020.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00021.27
8.2.110.0070.00421.09
8.2.100.0040.00718.03
8.2.90.0040.00418.22
8.2.80.0100.00017.97
8.2.70.0060.00617.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00820.07
8.2.30.0040.00418.07
8.2.20.0080.00017.75
8.2.10.0000.00718.06
8.2.00.0000.00717.79
8.1.280.0070.00725.92
8.1.270.0080.00024.02
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0090.01222.61
8.1.230.0080.00320.89
8.1.220.0050.00317.74
8.1.210.0030.00619.02
8.1.200.0030.00717.60
8.1.190.0080.00017.48
8.1.180.0080.00018.10
8.1.170.0120.00018.78
8.1.160.0030.00522.03
8.1.150.0040.00418.97
8.1.140.0040.00417.51
8.1.130.0000.00717.78
8.1.120.0000.00717.63
8.1.110.0030.00617.52
8.1.100.0050.00317.55
8.1.90.0030.00517.52
8.1.80.0040.00417.59
8.1.70.0040.00417.46
8.1.60.0040.00417.71
8.1.50.0050.00317.55
8.1.40.0030.00617.65
8.1.30.0030.00517.68
8.1.20.0000.00917.85
8.1.10.0050.00317.59
8.1.00.0000.01117.60
8.0.300.0040.00419.98
8.0.290.0090.00016.75
8.0.280.0000.00718.46
8.0.270.0030.00317.34
8.0.260.0030.00317.17
8.0.250.0030.00316.99
8.0.240.0070.00017.09
8.0.230.0000.00717.10
8.0.220.0000.00717.04
8.0.210.0000.00717.10
8.0.200.0030.00317.10
8.0.190.0050.00216.97
8.0.180.0050.00317.04
8.0.170.0020.00517.11
8.0.160.0040.00417.00
8.0.150.0040.00716.80
8.0.140.0070.00017.01
8.0.130.0030.00613.45
8.0.120.0050.00317.01
8.0.110.0000.00717.05
8.0.100.0040.00417.09
8.0.90.0030.00317.13
8.0.80.0070.01117.06
8.0.70.0000.00816.87
8.0.60.0040.00417.04
8.0.50.0040.00417.10
8.0.30.0120.01317.29
8.0.20.0130.01017.40
8.0.10.0040.00417.27
8.0.00.0120.00717.11
7.4.330.0000.00515.09
7.4.320.0030.00316.89
7.4.300.0060.00016.77
7.4.290.0000.00716.74
7.4.280.0000.00816.66
7.4.270.0030.00316.86
7.4.260.0030.00316.82
7.4.250.0080.00016.79
7.4.240.0020.00616.82
7.4.230.0000.00816.81
7.4.220.0110.00616.89
7.4.210.0090.01216.80
7.4.200.0030.00516.95
7.4.160.0040.01116.61
7.4.150.0160.00317.40
7.4.140.0130.01317.86
7.4.130.0110.00716.66
7.4.120.0100.01016.75
7.4.110.0080.00816.86
7.4.100.0140.00316.70
7.4.90.0130.00316.40
7.4.80.0030.01619.39
7.4.70.0110.00616.87
7.4.60.0130.00316.74
7.4.50.0030.00616.45
7.4.40.0100.01316.50
7.4.30.0090.00616.61
7.4.00.0070.00715.23
7.3.330.0000.00613.30
7.3.320.0050.00013.20
7.3.310.0070.00016.48
7.3.300.0000.00616.32
7.3.290.0110.00816.40
7.3.280.0070.00716.38
7.3.270.0090.00917.40
7.3.260.0150.00316.69
7.3.250.0070.01016.58
7.3.240.0140.00316.42
7.3.230.0110.00516.39
7.3.210.0120.00416.88
7.3.200.0100.00616.40
7.3.190.0130.00916.49
7.3.180.0120.00416.73
7.3.170.0100.00616.52
7.3.160.0060.00916.63
7.2.330.0100.00716.85
7.2.320.0100.00716.81
7.2.310.0070.01316.71
7.2.300.0060.01016.84
7.2.290.0090.00616.54
7.2.00.0140.00719.81
7.1.200.0060.00615.94
7.1.100.0040.00718.10
7.1.70.0000.00717.36
7.1.60.0140.01019.40
7.1.50.0100.01316.85
7.1.00.0070.07322.38
7.0.200.0600.00414.93
7.0.140.0070.07322.04
7.0.60.0000.07719.82
7.0.50.0070.04717.83
7.0.40.0000.04720.44
7.0.30.0330.07720.14
7.0.20.0230.04720.18
7.0.10.0100.07720.11
7.0.00.0130.05020.19
5.6.280.0030.07320.81
5.6.210.0300.07020.70
5.6.200.0070.08018.12
5.6.190.0070.08320.59
5.6.180.0270.05720.41
5.6.170.0370.06320.48
5.6.160.0170.06720.46
5.6.150.0070.08018.22
5.6.140.0070.04018.20
5.6.130.0030.05018.07
5.6.120.0100.05321.00
5.6.110.0030.08321.11
5.6.100.0130.04020.98
5.6.90.0270.07021.12
5.6.80.0170.05720.41
5.5.350.0170.07720.43
5.5.340.0030.04017.91
5.5.330.0130.07320.32
5.5.320.0030.09020.30
5.5.310.0300.07020.24
5.5.300.0000.05717.97
5.5.290.0030.08018.01
5.5.280.0100.07720.68
5.5.270.0100.08320.64
5.5.260.0130.06020.66
5.5.250.0130.07320.69
5.5.240.0230.07020.15
5.4.450.0200.05019.10
5.4.440.0400.04319.45
5.4.430.0330.04719.09
5.4.420.0130.03319.48
5.4.410.0470.04719.45
5.4.400.0570.04019.14
5.4.390.1270.05019.15
5.4.380.0230.07318.57
5.4.370.0330.06718.74
5.4.360.0400.04718.77
5.4.350.0370.06318.59
5.4.340.0230.08018.63
5.4.320.0050.03612.45
5.4.310.0130.04312.45
5.4.300.0100.03212.46
5.4.290.0030.04112.45
5.4.280.0050.03512.35
5.4.270.0070.03412.35
5.4.260.0040.03812.35
5.4.250.0070.04412.35
5.4.240.0070.03412.35
5.4.230.0060.03712.34
5.4.220.0060.03612.34
5.4.210.0030.03612.34
5.4.200.0090.04012.34
5.4.190.0050.03612.34
5.4.180.0050.03712.34
5.4.170.0030.03812.35
5.4.160.0080.03812.35
5.4.150.0040.04012.34
5.4.140.0070.04812.03
5.4.130.0070.03512.02
5.4.120.0030.04311.97
5.4.110.0080.04611.97
5.4.100.0080.03311.97
5.4.90.0090.03311.97
5.4.80.0060.03711.97
5.4.70.0060.03411.96
5.4.60.0050.03511.96
5.4.50.0080.03811.96
5.4.40.0060.03411.95
5.4.30.0070.03411.95
5.4.20.0050.03511.95
5.4.10.0050.03511.95
5.4.00.0080.03411.44
5.3.290.0090.03512.80
5.3.280.0090.04212.71
5.3.270.0040.04012.72
5.3.260.0080.05112.72
5.3.250.0040.03912.72
5.3.240.0050.03812.72
5.3.230.0070.03712.71
5.3.220.0100.03212.68
5.3.210.0090.05212.68
5.3.200.0070.04912.68
5.3.190.0070.04412.68
5.3.180.0080.03412.67
5.3.170.0080.03312.67
5.3.160.0110.03112.67
5.3.150.0090.03412.67
5.3.140.0080.04412.66
5.3.130.0040.04012.66
5.3.120.0060.04512.66
5.3.110.0080.04012.66
5.3.100.0090.03312.12
5.3.90.0060.03812.08
5.3.80.0060.03812.08
5.3.70.0090.03812.07
5.3.60.0040.04812.06
5.3.50.0100.03512.00
5.3.40.0070.03512.00
5.3.30.0040.03811.95
5.3.20.0060.03511.72
5.3.10.0050.03511.69
5.3.00.0080.03311.68
5.2.170.0040.0309.18
5.2.160.0050.0279.18
5.2.150.0110.0299.18
5.2.140.0050.0299.17
5.2.130.0070.0349.14
5.2.120.0040.0309.13
5.2.110.0040.0299.14
5.2.100.0010.0319.14
5.2.90.0040.0299.14
5.2.80.0060.0299.13
5.2.70.0070.0319.13
5.2.60.0030.0429.09
5.2.50.0080.0359.06
5.2.40.0060.0269.04
5.2.30.0060.0279.02
5.2.20.0040.0359.01
5.2.10.0050.0268.92
5.2.00.0060.0328.78
5.1.60.0030.0248.07
5.1.50.0040.0308.06
5.1.40.0040.0288.04
5.1.30.0040.0458.39
5.1.20.0030.0298.41
5.1.10.0100.0288.14
5.1.00.0060.0238.14
5.0.50.0050.0196.61
5.0.40.0060.0236.48
5.0.30.0030.0356.29
5.0.20.0030.0316.26
5.0.10.0000.0226.24
5.0.00.0030.0306.23
4.4.90.0060.0114.78
4.4.80.0020.0214.75
4.4.70.0020.0174.76
4.4.60.0020.0154.75
4.4.50.0030.0224.77
4.4.40.0050.0314.71
4.4.30.0060.0284.76
4.4.20.0050.0134.85
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0030.0154.66
4.3.100.0030.0194.66
4.3.90.0080.0184.63
4.3.80.0040.0344.58
4.3.70.0020.0144.63
4.3.60.0020.0154.63
4.3.50.0090.0184.63
4.3.40.0040.0234.54
4.3.30.0020.0163.28
4.3.20.0010.0193.26
4.3.10.0020.0263.22
4.3.00.0000.01716.02

preferences:
46.11 ms | 401 KiB | 5 Q