3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format_text($string) { $string = preg_replace('/(\*\*(.*?)\*\*)/', '<b>\\2</b>', $string); $string = preg_replace('/(##(.*?)##)/', '<em>\\2</em>', $string); return $string; } $before = "Focus on the **user** and all else will ##follow##."; $after = format_text($before); echo $after;

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.0090.00616.72
8.3.50.0120.00921.95
8.3.40.0100.00718.86
8.3.30.0110.01118.88
8.3.20.0070.00020.35
8.3.10.0030.00523.48
8.3.00.0040.00420.77
8.2.180.0070.00716.73
8.2.170.0110.00422.96
8.2.160.0040.01120.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00020.95
8.2.110.0060.00322.12
8.2.100.0060.00617.70
8.2.90.0000.00719.05
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0050.00321.13
8.2.30.0040.00418.20
8.2.20.0030.00517.75
8.2.10.0040.00418.11
8.2.00.0000.00817.87
8.1.280.0030.01025.92
8.1.270.0090.00024.04
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01022.22
8.1.230.0080.00419.08
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0070.00317.35
8.1.180.0060.00318.10
8.1.170.0040.00418.62
8.1.160.0070.00021.95
8.1.150.0040.00418.70
8.1.140.0080.00017.46
8.1.130.0000.00717.78
8.1.120.0070.00017.58
8.1.110.0080.00017.45
8.1.100.0080.00017.44
8.1.90.0000.00717.55
8.1.80.0080.00017.48
8.1.70.0000.00717.52
8.1.60.0030.00617.62
8.1.50.0020.00517.58
8.1.40.0060.00317.72
8.1.30.0000.00817.76
8.1.20.0000.00817.77
8.1.10.0000.00717.63
8.1.00.0070.00417.51
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0000.00718.39
8.0.270.0070.00017.29
8.0.260.0000.00617.16
8.0.250.0040.00417.16
8.0.240.0040.00417.00
8.0.230.0000.00716.91
8.0.220.0000.00716.99
8.0.210.0030.00316.98
8.0.200.0030.00316.97
8.0.190.0080.00016.94
8.0.180.0080.00017.01
8.0.170.0050.00517.00
8.0.160.0040.00417.01
8.0.150.0000.00716.93
8.0.140.0000.00716.94
8.0.130.0060.00013.48
8.0.120.0000.00817.00
8.0.110.0020.00517.05
8.0.100.0060.00317.01
8.0.90.0040.00416.86
8.0.80.0040.01117.01
8.0.70.0040.00417.00
8.0.60.0000.00816.78
8.0.50.0040.00416.85
8.0.30.0090.01117.39
8.0.20.0080.01417.40
8.0.10.0040.00417.05
8.0.00.0110.00616.84
7.4.330.0050.00015.00
7.4.320.0070.00016.73
7.4.300.0030.00316.82
7.4.290.0080.00016.86
7.4.280.0000.00816.64
7.4.270.0000.00816.83
7.4.260.0000.00816.68
7.4.250.0000.00716.68
7.4.240.0030.00416.74
7.4.230.0070.00016.63
7.4.220.0100.01016.83
7.4.210.0050.01216.68
7.4.200.0070.00016.65
7.4.190.0000.00816.72
7.4.160.0080.00816.88
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0030.01316.67
7.4.120.0060.01316.67
7.4.110.0140.00316.69
7.4.100.0110.00716.59
7.4.90.0070.01016.73
7.4.80.0100.01019.39
7.4.70.0150.00616.77
7.4.60.0060.00916.61
7.4.50.0000.00516.68
7.4.40.0090.00716.83
7.4.30.0120.00416.56
7.4.00.0070.01015.33
7.3.330.0030.00213.23
7.3.320.0000.00513.44
7.3.310.0000.00916.50
7.3.300.0060.00016.42
7.3.290.0110.00416.52
7.3.280.0090.00816.47
7.3.270.0030.01417.40
7.3.260.0070.01016.62
7.3.250.0080.01216.47
7.3.240.0040.01216.79
7.3.230.0090.00916.73
7.3.210.0100.00716.46
7.3.200.0140.00419.39
7.3.190.0060.01016.35
7.3.180.0060.01016.36
7.3.170.0060.01316.66
7.3.160.0050.01116.88
7.3.120.0150.00014.87
7.3.10.0030.00616.73
7.3.00.0060.00916.63
7.2.330.0120.00816.77
7.2.320.0030.01316.57
7.2.310.0110.00516.77
7.2.300.0060.00916.77
7.2.290.0110.00816.80
7.2.130.0100.01016.94
7.2.120.0130.01016.67
7.2.110.0100.00316.61
7.2.100.0050.00916.60
7.2.90.0140.00316.47
7.2.80.0140.00616.84
7.2.70.0130.00816.42
7.2.60.0150.00916.97
7.2.50.0120.00416.47
7.2.40.0140.00516.82
7.2.30.0090.00916.64
7.2.20.0170.01516.57
7.2.10.0140.00316.59
7.2.00.0030.01217.02
7.1.250.0090.00615.49
7.1.70.0040.00817.35
7.1.60.0130.01319.46
7.1.50.0140.00717.22
7.1.00.0070.06722.44
7.0.200.0040.00416.88
7.0.140.0000.07322.12
7.0.60.0000.09019.79
7.0.50.0130.06017.85
7.0.40.0030.04720.29
7.0.30.0600.06720.10
7.0.20.0230.05320.20
7.0.10.0200.06720.25
7.0.00.0130.03320.16
5.6.280.0070.06721.00
5.6.210.0070.05320.64
5.6.200.0100.06018.19
5.6.190.0070.08320.34
5.6.180.3300.04720.53
5.6.170.0370.07320.46
5.6.160.0200.05720.39
5.6.150.0000.06318.16
5.6.140.0100.07718.14
5.6.130.0070.08318.15
5.6.120.0070.07720.98
5.6.110.0100.06020.98
5.6.100.0100.07320.89
5.6.90.0000.04720.88
5.6.80.0100.07720.54
5.6.70.0400.06020.52
5.5.350.0170.08720.41
5.5.340.0130.07317.98
5.5.330.0070.07020.43
5.5.320.0300.03720.21
5.5.310.0400.06720.24
5.5.300.0030.07718.08
5.5.290.0100.08317.95
5.5.280.0000.06020.85
5.5.270.0070.04020.77
5.5.260.0170.06020.82
5.5.250.0000.09020.70
5.5.240.0170.05720.29
5.4.450.0370.05019.21
5.4.440.0800.06019.58
5.4.430.0800.05019.73
5.4.420.0630.00019.23
5.4.410.0100.05718.96
5.4.400.0100.06318.75
5.4.390.0330.04318.75
5.4.380.0330.05318.47
5.4.370.0030.05718.76
5.4.360.0100.04318.80
5.4.350.0090.03712.02
5.4.340.0080.03912.02
5.4.320.0070.04012.50
5.4.310.0070.04012.50
5.4.300.0070.05412.50
5.4.290.0100.05412.50
5.4.280.0110.05012.39
5.4.270.0120.05012.40
5.4.260.0130.05812.40
5.4.250.0100.05112.40
5.4.240.0120.05412.40
5.4.230.0060.05512.39
5.4.220.0040.04612.39
5.4.210.0050.04112.39
5.4.200.0080.04112.39
5.4.190.0140.05512.39
5.4.180.0040.05412.38
5.4.170.0060.04812.40
5.4.160.0100.04212.39
5.4.150.0070.04612.38
5.4.140.0120.04412.07
5.4.130.0110.04112.06
5.4.120.0110.04512.02
5.4.110.0110.04612.02
5.4.100.0070.04612.02
5.4.90.0070.04812.01
5.4.80.0080.05012.01
5.4.70.0070.05012.01
5.4.60.0130.04712.01
5.4.50.0190.08012.01
5.4.40.0080.05012.00
5.4.30.0130.04211.99
5.4.20.0090.05111.99
5.4.10.0130.06712.00
5.4.00.0080.04711.48
5.3.290.0050.04612.80
5.3.280.0130.05012.70
5.3.270.0130.05612.73
5.3.260.0120.05512.72
5.3.250.0150.10612.72
5.3.240.0110.09812.72
5.3.230.0180.09112.71
5.3.220.0210.09012.68
5.3.210.0110.08312.68
5.3.200.0080.06012.68
5.3.190.0070.05312.68
5.3.180.0080.05412.67
5.3.170.0140.05612.67
5.3.160.0100.05612.67
5.3.150.0190.07012.67
5.3.140.0060.05312.66
5.3.130.0050.05512.66
5.3.120.0070.05412.66
5.3.110.0060.06112.66
5.3.100.0110.03812.13
5.3.90.0100.06812.11
5.3.80.0100.05812.10
5.3.70.0090.03712.10
5.3.60.0070.04512.09
5.3.50.0080.03812.03
5.3.40.0060.04512.03
5.3.30.0070.04011.98
5.3.20.0120.06711.77
5.3.10.0080.03911.74
5.3.00.0090.04811.72
5.2.170.0060.0389.23
5.2.160.0010.0349.23
5.2.150.0060.0459.23
5.2.140.0100.0329.23
5.2.130.0070.0369.18
5.2.120.0080.0319.18
5.2.110.0070.0299.19
5.2.100.0070.0379.19
5.2.90.0060.0349.19
5.2.80.0020.0399.18
5.2.70.0070.0429.18
5.2.60.0100.0519.13
5.2.50.0050.0359.10
5.2.40.0070.0299.09
5.2.30.0030.0379.06
5.2.20.0040.0329.05
5.2.10.0060.0328.94
5.2.00.0060.0308.80
5.1.60.0060.0248.09
5.1.50.0050.0248.09
5.1.40.0050.0248.06
5.1.30.0050.0258.41
5.1.20.0020.0298.43
5.1.10.0040.0268.16
5.1.00.0060.0278.16
5.0.50.0040.0286.64
5.0.40.0070.0256.50
5.0.30.0110.0456.31
5.0.20.0020.0236.28
5.0.10.0070.0196.26
5.0.00.0040.0306.25
4.4.90.0010.0184.78
4.4.80.0040.0184.75
4.4.70.0020.0244.76
4.4.60.0060.0154.76
4.4.50.0000.0214.77
4.4.40.0060.0294.71
4.4.30.0050.0194.76
4.4.20.0050.0204.85
4.4.10.0090.0494.85
4.4.00.0060.0244.76
4.3.110.0030.0204.67
4.3.100.0050.0184.66
4.3.90.0050.0164.63
4.3.80.0030.0264.58
4.3.70.0030.0154.63
4.3.60.0070.0244.63
4.3.50.0030.0184.63
4.3.40.0090.0434.53
4.3.30.0040.0243.30
4.3.20.0020.0183.28
4.3.10.0010.0203.24
4.3.00.0170.0176.38

preferences:
39.4 ms | 401 KiB | 5 Q