3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '我这是怎么了'; echo preg_replace("/([u4e00-u9fa5].)/","<font color=red>1</font>",$str); $test = "php编程"; if (preg_match("/^[x{4e00}-x{9fa5}]+$/u",$test)) { print("该字符串全部是中文"); } else { print("该字符串不全部是中文"); } ?>

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.20.0080.01218.02
8.4.10.0090.00317.97
8.3.150.0120.00617.22
8.3.140.0090.00618.69
8.3.130.0070.00316.84
8.3.120.0070.00418.53
8.3.110.0040.00820.94
8.3.100.0000.00824.06
8.3.90.0070.01126.77
8.3.80.0060.00318.56
8.3.70.0110.00716.63
8.3.60.0040.01116.75
8.3.50.0110.00822.11
8.3.40.0150.00019.10
8.3.30.0040.01118.83
8.3.20.0060.00320.21
8.3.10.0030.00523.61
8.3.00.0100.00019.38
8.2.270.0090.00917.09
8.2.260.0120.00316.88
8.2.250.0060.00318.74
8.2.240.0000.00817.11
8.2.230.0090.00022.58
8.2.220.0080.00837.54
8.2.210.0090.00626.77
8.2.200.0060.00316.75
8.2.190.0030.01716.88
8.2.180.0090.00616.75
8.2.170.0120.00322.96
8.2.160.0130.00020.52
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0030.00619.48
8.2.120.0040.00426.35
8.2.110.0070.00321.02
8.2.100.0060.00617.80
8.2.90.0000.00719.05
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0050.00317.80
8.2.50.0000.00918.07
8.2.40.0000.00719.38
8.2.30.0070.00020.71
8.2.20.0000.00817.81
8.2.10.0070.00017.98
8.2.00.0000.00817.89
8.1.310.0100.00716.23
8.1.300.0050.00318.30
8.1.290.0040.00730.84
8.1.280.0140.00325.92
8.1.270.0060.00323.92
8.1.260.0020.00528.09
8.1.250.0000.00728.09
8.1.240.0090.00022.66
8.1.230.0000.01119.23
8.1.220.0060.00317.78
8.1.210.0030.00918.77
8.1.200.0060.00317.35
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0090.00018.93
8.1.160.0050.00222.02
8.1.150.0030.00518.84
8.1.140.0100.00019.59
8.1.130.0030.00317.66
8.1.120.0040.00417.59
8.1.110.0080.00017.46
8.1.100.0000.00817.40
8.1.90.0070.00017.56
8.1.80.0040.00417.46
8.1.70.0000.00717.55
8.1.60.0060.00317.67
8.1.50.0000.00917.63
8.1.40.0000.00817.60
8.1.30.0080.00017.74
8.1.20.0030.00617.70
8.1.10.0040.00417.65
8.1.00.0040.00417.61
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0040.00418.46
8.0.270.0000.01017.15
8.0.260.0000.00917.32
8.0.250.0000.00717.14
8.0.240.0000.00917.15
8.0.230.0030.00617.03
8.0.220.0000.00716.94
8.0.210.0000.00716.91
8.0.200.0040.00417.07
8.0.190.0050.00317.16
8.0.180.0000.00916.96
8.0.170.0070.00417.07
8.0.160.0000.00716.92
8.0.150.0000.00717.00
8.0.140.0030.00516.95
8.0.130.0030.00313.42
8.0.120.0080.00017.00
8.0.110.0060.00316.95
8.0.100.0040.00417.12
8.0.90.0070.00016.92
8.0.80.0140.00717.02
8.0.70.0040.00417.14
8.0.60.0040.00416.93
8.0.50.0000.00716.98
8.0.30.0120.00617.13
8.0.20.0110.00817.45
8.0.10.0070.00017.13
8.0.00.0040.01616.99
7.4.330.0050.00016.71
7.4.320.0000.00716.72
7.4.300.0070.00016.72
7.4.290.0030.00516.64
7.4.280.0000.00816.54
7.4.270.0000.00816.58
7.4.260.0070.00016.61
7.4.250.0080.00016.67
7.4.240.0010.00616.73
7.4.230.0000.00616.63
7.4.220.0130.01016.78
7.4.210.0060.01016.77
7.4.200.0020.00516.76
7.4.160.0030.01216.80
7.4.150.0060.01217.40
7.4.140.0070.01517.86
7.4.130.0090.00716.64
7.4.120.0090.01016.67
7.4.110.0140.00316.59
7.4.100.0090.00916.80
7.4.90.0140.00316.64
7.4.80.0140.00319.39
7.4.70.0110.00716.69
7.4.60.0120.00316.50
7.4.50.0040.01416.50
7.4.40.0120.00416.65
7.4.30.0150.00616.45
7.4.00.0070.00714.89
7.3.330.0050.00313.09
7.3.320.0040.00413.19
7.3.310.0000.00816.42
7.3.300.0000.00716.25
7.3.290.0080.00916.35
7.3.280.0100.00816.29
7.3.270.0110.00517.40
7.3.260.0090.01316.58
7.3.250.0130.00716.56
7.3.240.0120.00716.63
7.3.230.0030.01316.64
7.3.210.0060.01216.55
7.3.200.0060.01216.45
7.3.190.0100.00716.62
7.3.180.0120.00616.70
7.3.170.0100.00716.42
7.3.160.0110.00616.44
7.2.330.0090.00916.69
7.2.320.0080.00716.68
7.2.310.0180.00016.57
7.2.300.0090.01216.58
7.2.290.0040.01416.56
7.2.00.0000.01619.03
7.1.100.0690.01316.46
7.1.70.0030.00517.27
7.1.60.0120.00919.48
7.1.50.0140.00716.92
7.1.00.0070.07322.52
7.0.200.0350.00314.27
7.0.60.0100.08719.91
7.0.50.0100.08017.80
7.0.40.0030.04020.07
7.0.30.0370.05720.14
7.0.20.0330.06320.19
7.0.10.0000.05320.15
7.0.00.0030.04320.21
5.6.280.0030.06020.77
5.6.210.0030.08720.47
5.6.200.0100.07718.15
5.6.190.0070.04020.65
5.6.180.0100.06720.60
5.6.170.0270.06020.51
5.6.160.0030.06320.61
5.6.150.0030.04018.07
5.6.140.0030.06718.09
5.6.130.0070.08718.18
5.6.120.0100.09021.02
5.6.110.0170.07721.03
5.6.100.0070.08721.12
5.6.90.0170.07320.96
5.6.80.0130.06720.34
5.5.350.4230.04020.38
5.5.340.0170.07017.88
5.5.330.0030.05320.56
5.5.320.0030.06020.21
5.5.310.0130.04720.34
5.5.300.0030.08318.02
5.5.290.0030.08317.89
5.5.280.0070.05020.64
5.5.270.0100.07320.86
5.5.260.0100.08320.71
5.5.250.0070.05020.60
5.5.240.0300.07720.19

preferences:
27.66 ms | 403 KiB | 5 Q