3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = <<<'REGEX' ~ <strong\s*> # Match strong open tag ( # Open group 1 (?: # Non-capturing group (?:(?!</?strong\s*>).) # Match anything that's not strong tag (open/close) | # Or (?R) # Repeat the whole pattern )* # Repeat the non-capturing group zero or more times ) # Close group 1 </strong\s*> # Match strong close tag ~xs REGEX; # The x modifier is for the fancy spacing en commenting # The s modifier is to match newlines with dot "." $output = preg_replace_callback($regex, function($m){ return '<strong>' . preg_replace('~</?strong\s*>~', '', $m[1]) . '</strong>'; }, $input); echo $output; // w1 <strong>w2</strong> w3 w4 <strong>w5 w6</strong> w7

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.0100.00718.68
8.3.50.0120.00722.15
8.3.40.0040.01118.79
8.3.30.0120.00619.04
8.3.20.0040.00420.52
8.3.10.0040.00421.96
8.3.00.0080.00022.57
8.2.180.0090.00916.75
8.2.170.0110.00422.96
8.2.160.0100.00319.17
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00019.61
8.2.110.0070.00322.27
8.2.100.0000.01119.89
8.2.90.0080.00019.05
8.2.80.0080.00017.97
8.2.70.0000.00817.73
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0040.00418.09
8.2.30.0040.00418.21
8.2.20.0080.00018.02
8.2.10.0040.00417.90
8.2.00.0070.00017.98
8.1.280.0120.00625.92
8.1.270.0080.00022.17
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.97
8.1.230.0080.00319.02
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0040.00417.39
8.1.180.0000.00818.91
8.1.170.0050.00318.72
8.1.160.0080.00022.07
8.1.150.0000.00818.82
8.1.140.0070.00017.64
8.1.130.0000.00717.95
8.1.120.0040.00417.61
8.1.110.0060.00317.59
8.1.100.0030.00317.67
8.1.90.0040.00417.56
8.1.80.0050.00217.49
8.1.70.0070.00017.63
8.1.60.0000.00817.75
8.1.50.0090.00017.70
8.1.40.0000.00817.64
8.1.30.0000.00817.80
8.1.20.0000.00817.82
8.1.10.0000.00817.73
8.1.00.0000.00817.55
8.0.300.0070.00018.77
8.0.290.0040.00417.04
8.0.280.0080.00018.42
8.0.270.0000.00717.30
8.0.260.0000.00817.02
8.0.250.0000.00717.11
8.0.240.0040.00417.17
8.0.230.0000.00717.15
8.0.220.0000.00616.96
8.0.210.0070.00017.13
8.0.200.0030.00317.05
8.0.190.0040.00417.19
8.0.180.0070.00017.14
8.0.170.0040.00417.18
8.0.160.0070.00016.99
8.0.150.0000.00717.11
8.0.140.0000.00717.09
8.0.130.0030.00313.52
8.0.120.0040.00417.09
8.0.110.0040.00417.05
8.0.100.0000.00717.02
8.0.90.0030.00616.98
8.0.80.0110.00717.13
8.0.70.0000.00717.01
8.0.60.0090.00017.16
8.0.50.0040.00416.94
8.0.30.0120.01117.32
8.0.20.0150.00617.53
8.0.10.0080.00017.11
8.0.00.0130.00816.95
7.4.330.0000.00515.00
7.4.320.0030.00316.76
7.4.300.0070.00016.70
7.4.290.0000.00716.73
7.4.280.0000.00816.88
7.4.270.0070.00016.85
7.4.260.0040.00416.62
7.4.250.0050.00216.71
7.4.240.0020.00616.79
7.4.230.0030.00516.60
7.4.220.0110.01416.72
7.4.210.0120.00716.87
7.4.200.0030.00316.59
7.4.190.0030.00316.97
7.4.160.0140.01016.95
7.4.150.0150.00317.40
7.4.140.0070.01217.86
7.4.130.0110.00716.77
7.4.120.0120.00716.73
7.4.110.0030.01516.73
7.4.100.0060.01216.67
7.4.90.0150.00916.70
7.4.80.0120.01519.39
7.4.70.0110.00916.55
7.4.60.0000.01616.72
7.4.50.0030.00516.68
7.4.40.0000.01122.77
7.4.30.0090.01216.78
7.4.00.0060.00615.14
7.3.330.0030.00313.53
7.3.320.0020.00213.38
7.3.310.0000.00716.43
7.3.300.0070.00016.40
7.3.290.0140.00016.49
7.3.280.0070.00816.53
7.3.270.0100.00717.40
7.3.260.0150.00816.94
7.3.250.0110.00816.63
7.3.240.0140.00416.59
7.3.230.0090.01316.63
7.3.210.0060.01216.52
7.3.200.0110.01119.39
7.3.190.0070.01116.72
7.3.180.0060.01016.59
7.3.170.0040.01216.61
7.3.160.0080.00916.72
7.3.120.0030.01414.71
7.2.330.0100.00716.97
7.2.320.0150.00616.89
7.2.310.0110.01116.84
7.2.300.0110.01416.81
7.2.290.0110.00616.82
7.2.00.0030.00919.71
7.1.100.0040.00818.25
7.1.70.0100.01017.02
7.1.60.0030.00717.34
7.1.50.0140.00717.06
7.1.00.0030.09022.28
7.0.200.0000.00716.93
7.0.140.0170.06022.16
7.0.70.3430.03319.93
7.0.60.0030.04720.01
7.0.50.0170.07017.83
7.0.40.0130.08020.11
7.0.30.0230.06720.28
7.0.20.0130.04320.08
7.0.10.0130.09320.25
7.0.00.0100.06720.25
5.6.280.0000.07720.91
5.6.210.0100.08320.56
5.6.200.0030.04018.14
5.6.190.0030.04720.63
5.6.180.0070.05020.59
5.6.170.0200.03720.50
5.6.160.0100.05020.47
5.6.150.0130.08018.12
5.6.140.0030.05318.24
5.6.130.0200.03318.11
5.6.120.0070.08021.02
5.6.110.0100.08320.99
5.6.100.0030.04020.98
5.6.90.0130.04720.95
5.6.80.0170.07320.44
5.6.70.0300.06720.38
5.5.350.0070.08720.47
5.5.340.0030.04017.99
5.5.330.0070.05720.29
5.5.320.0130.07720.13
5.5.310.0400.04320.20
5.5.300.0170.06717.93
5.5.290.0070.08017.95
5.5.280.0100.08020.97
5.5.270.0100.07320.73
5.5.260.0100.07320.68
5.5.250.0130.07720.59
5.5.240.0130.06320.25
5.4.450.0070.06019.43
5.4.440.1270.06019.36
5.4.430.0070.06019.45
5.4.420.0770.06719.67
5.4.410.0100.05319.20
5.4.400.0130.05019.13
5.4.390.0700.06319.08
5.4.380.0300.04718.76
5.4.370.0070.04018.75
5.4.360.0030.04318.72
5.4.350.0090.03212.02
5.4.340.0050.03712.02
5.4.320.0100.04512.50
5.4.310.0080.04712.50
5.4.300.0050.03812.50
5.4.290.0080.03912.49
5.4.280.0060.04012.39
5.4.270.0070.04412.39
5.4.260.0170.04318.97
5.4.250.0130.04719.00
5.4.240.0070.05318.73
5.4.230.0030.06018.76
5.4.220.0100.08019.11
5.4.210.0200.06718.90
5.4.200.0170.04318.67
5.4.190.0100.05318.99
5.4.180.0070.05318.96
5.4.170.0100.05319.02
5.4.160.0070.05018.79
5.4.150.0130.04719.01
5.4.140.0030.05716.41
5.4.130.0100.07016.30
5.4.120.0100.07016.39
5.4.110.0100.05016.54
5.4.100.0070.05716.46
5.4.90.0100.04316.42
5.4.80.0170.03716.50
5.4.70.0070.04716.42
5.4.60.0100.04716.39
5.4.50.0100.06016.60
5.4.40.0070.05316.36
5.4.30.0130.05316.34
5.4.20.0200.04016.46
5.4.10.0130.05316.38
5.4.00.0070.04715.81
5.3.290.0090.03812.80
5.3.280.0100.05314.67
5.3.270.0130.04714.74
5.3.260.0100.07714.76
5.3.250.0030.05314.62
5.3.240.0130.05014.69
5.3.230.0200.05314.75
5.3.220.0070.07714.64
5.3.210.0130.05314.58
5.3.200.0100.04314.46
5.3.190.0100.04714.64
5.3.180.0030.05314.57
5.3.170.0070.05014.56
5.3.160.0100.05014.46
5.3.150.0070.05314.54
5.3.140.0130.04314.63
5.3.130.0030.05314.70
5.3.120.0070.08014.73
5.3.110.0130.05314.64
5.3.100.0100.05014.02
5.3.90.0030.07714.18
5.3.80.0170.05314.00
5.3.70.0070.04714.10
5.3.60.0100.04714.07
5.3.50.0130.04713.95
5.3.40.0070.05314.02
5.3.30.0100.04313.99
5.3.20.0070.04713.92
5.3.10.0170.04313.63
5.3.00.0070.05313.72
5.2.170.0130.03310.90
5.2.160.0170.03311.07
5.2.150.0100.04711.29
5.2.140.0030.04711.24
5.2.130.0070.04011.11
5.2.120.0070.05010.93
5.2.110.0030.04011.00
5.2.100.0030.05311.10
5.2.90.0100.03711.11
5.2.80.0070.04010.85
5.2.70.0030.04711.00
5.2.60.0030.04311.20
5.2.50.0070.05011.02
5.2.40.0100.03311.01
5.2.30.0000.04710.99
5.2.20.0100.03310.89
5.2.10.0030.04010.76
5.2.00.0030.04310.78
5.1.60.0070.03310.18
5.1.50.0070.03310.07
5.1.40.0100.04010.17
5.1.30.0030.03710.49
5.1.20.0070.03310.51
5.1.10.0100.03010.03
5.1.00.0070.03310.02
5.0.50.0100.0338.64
5.0.40.0000.0438.29
5.0.30.0070.0478.18
5.0.20.0070.0308.15
5.0.10.0070.0408.26
5.0.00.0030.0538.30
4.4.90.0000.0335.79
4.4.80.0030.0235.68
4.4.70.0030.0205.75
4.4.60.0000.0305.84
4.4.50.0030.0205.75
4.4.40.0000.0475.79
4.4.30.0100.0135.77
4.4.20.0000.0235.85
4.4.10.0000.0235.81
4.4.00.0070.0335.82
4.3.110.0030.0205.70
4.3.100.0070.0175.75
4.3.90.0000.0335.73
4.3.80.0070.0335.75
4.3.70.0070.0175.70
4.3.60.0000.0235.67
4.3.50.0000.0235.68
4.3.40.0000.0335.64
4.3.30.0030.0205.17
4.3.20.0000.0275.17
4.3.10.0030.0205.17
4.3.00.0170.0177.80

preferences:
39.05 ms | 401 KiB | 5 Q