3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text1 = <<<EOD <tr class="aaa"> <td class="bbb"> <p> あああああ </p> </td> <tr> EOD; $text2 = <<<EOD <tr class="aaa"> <td class="bbb"> あああああ </td> <tr> EOD; echo "【RESULT 1】\n\n"; echo preg_replace_callback( '@(<br[^>]*+>)|\s?<p>|</p>\s?|(?<=<t[rd])[^>]*+(?=>)@', function ($matches) { return isset($matches[1]) ? '、' : ''; }, $text1 ); echo "\n\n【RESULT 2】\n\n"; echo preg_replace_callback( '@(<br[^>]*+>)|\s?<p>|</p>\s?|(?<=<t[rd])[^>]*+(?=>)@', function ($matches) { return isset($matches[1]) ? '、' : ''; }, $text2 );

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.00617.13
8.3.50.0100.01018.47
8.3.40.0080.00819.04
8.3.30.0110.00719.10
8.3.20.0000.00818.99
8.3.10.0060.00320.86
8.3.00.0050.00319.63
8.2.180.0100.01018.54
8.2.170.0120.00922.96
8.2.160.0100.01020.25
8.2.150.0070.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00020.93
8.2.110.0040.01520.58
8.2.100.0030.00918.16
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0060.00317.60
8.2.60.0080.00018.03
8.2.50.0000.00818.10
8.2.40.0060.00320.45
8.2.30.0040.00718.23
8.2.20.0060.00319.71
8.2.10.0060.00317.93
8.2.00.0040.00418.00
8.1.280.0070.01125.92
8.1.270.0090.00024.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00322.73
8.1.230.0080.00417.77
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0110.00217.60
8.1.190.0030.00517.60
8.1.180.0050.00318.10
8.1.170.0040.00418.78
8.1.160.0040.00422.11
8.1.150.0000.00718.96
8.1.140.0040.00417.70
8.1.130.0060.00317.89
8.1.120.0040.00417.52
8.1.110.0040.00417.53
8.1.100.0040.00417.57
8.1.90.0000.00717.58
8.1.80.0050.00317.63
8.1.70.0000.00717.56
8.1.60.0040.00417.68
8.1.50.0070.00017.63
8.1.40.0030.00517.59
8.1.30.0000.00817.72
8.1.20.0050.00317.80
8.1.10.0000.00717.68
8.1.00.0080.00017.65
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0040.00418.55
8.0.270.0000.00717.29
8.0.260.0030.00317.11
8.0.250.0040.00417.14
8.0.240.0000.00717.30
8.0.230.0070.00017.19
8.0.220.0040.00417.24
8.0.210.0000.00717.07
8.0.200.0070.00017.12
8.0.190.0040.00417.17
8.0.180.0000.00717.04
8.0.170.0040.00417.19
8.0.160.0030.00317.23
8.0.150.0000.00717.07
8.0.140.0000.00917.02
8.0.130.0030.00313.51
8.0.120.0020.00517.23
8.0.110.0040.00417.02
8.0.100.0000.00717.27
8.0.90.0000.00717.04
8.0.80.0100.01017.21
8.0.70.0040.00417.13
8.0.60.0050.00217.27
8.0.50.0000.00817.06
8.0.30.0110.01117.15
8.0.20.0140.00817.41
8.0.10.0080.00017.26
8.0.00.0070.01116.91
7.4.330.0000.00513.27
7.4.320.0070.00016.70
7.4.300.0000.00616.80
7.4.290.0000.00816.84
7.4.280.0080.00016.84
7.4.270.0000.00716.70
7.4.260.0040.00413.59
7.4.250.0100.00016.89
7.4.240.0070.00016.79
7.4.230.0070.00016.64
7.4.220.0060.01216.93
7.4.210.0100.00416.83
7.4.200.0000.00716.68
7.4.190.0040.00416.82
7.4.160.0000.01716.79
7.4.150.0190.00616.63
7.4.140.0100.01016.84
7.4.130.0090.01516.73
7.4.120.0130.00916.79
7.4.110.0160.00316.90
7.4.100.0090.00916.70
7.4.90.0140.01116.73
7.4.80.0090.01519.39
7.4.70.0110.00616.90
7.4.60.0100.01216.67
7.4.50.0050.00016.72
7.4.40.0040.01516.77
7.4.30.0090.00916.72
7.4.00.0070.00715.11
7.3.330.0030.00313.40
7.3.320.0000.00613.38
7.3.310.0040.00416.69
7.3.300.0070.00016.60
7.3.290.0100.00616.59
7.3.280.0080.01016.60
7.3.270.0100.00716.66
7.3.260.0090.00916.62
7.3.250.0070.01016.66
7.3.240.0060.01016.84
7.3.230.0110.00716.57
7.3.210.0080.01516.50
7.3.200.0030.01516.48
7.3.190.0030.01316.51
7.3.180.0110.00416.46
7.3.170.0100.01016.83
7.3.160.0090.00616.64
7.3.120.0000.01415.05
7.3.10.0030.01316.78
7.3.00.0030.00616.83
7.2.330.0120.01016.77
7.2.320.0090.00916.73
7.2.310.0090.01316.59
7.2.300.0110.00616.67
7.2.290.0030.01416.86
7.2.130.0060.00616.81
7.2.120.0110.00317.13
7.2.110.0060.00617.01
7.2.100.0080.00417.14
7.2.90.0030.01317.11
7.2.80.0080.00817.02
7.2.70.0040.00817.07
7.2.60.0080.00317.20
7.2.50.0090.00617.12
7.2.40.0000.01417.16
7.2.30.0060.00817.11
7.2.20.0040.01216.96
7.2.10.0070.00717.02
7.2.00.0040.00918.21
7.1.250.0060.00616.12
7.1.100.0040.00418.38
7.1.70.0000.00817.23
7.1.60.0130.00319.31
7.1.50.0110.01517.21
7.1.00.0030.04722.54
7.0.200.0100.00016.98
7.0.140.0100.06722.21
7.0.120.0030.07022.19
7.0.60.0030.04719.95
7.0.50.0030.08717.89
7.0.40.0030.04320.33
7.0.30.0230.08320.14
7.0.20.0430.07320.12
7.0.10.0030.04720.09
7.0.00.0170.08320.11
5.6.280.0000.07321.03
5.6.210.0130.07020.56
5.6.200.0030.04018.19
5.6.190.0100.08020.48
5.6.180.0400.04020.50
5.6.170.0370.07720.44
5.6.160.0030.06020.54
5.6.150.0070.08318.18
5.6.140.0070.03718.28
5.6.130.0070.05718.16
5.6.120.0030.08720.89
5.6.110.0070.08021.00
5.6.100.0100.08021.02
5.6.90.0100.08320.97
5.6.80.0070.03720.48
5.5.350.0200.07720.30
5.5.340.0100.03318.09
5.5.330.0070.04720.27
5.5.320.0300.03320.32
5.5.310.0200.05320.37
5.5.300.0130.06318.01
5.5.290.0200.07317.93
5.5.280.0100.06020.86
5.5.270.0130.07320.67
5.5.260.0100.08320.77
5.5.250.0030.08320.50
5.5.240.0300.06320.38
5.4.450.0070.04719.48
5.4.440.0130.07319.30
5.4.430.0130.07319.48
5.4.420.0070.06719.51
5.4.410.0030.04019.35
5.4.400.0130.07019.15
5.4.390.0100.07019.11
5.4.380.0000.04018.98
5.4.370.0070.06318.85
5.4.360.0100.04319.24
5.4.350.0030.04718.85
5.4.340.0030.05019.14
5.4.320.0100.09018.97
5.4.310.0000.05319.25
5.4.300.0030.05318.97
5.4.290.0070.06719.23
5.4.280.0100.05719.23
5.4.270.0030.05018.92
5.4.260.0070.06019.04
5.4.250.0030.04019.15
5.4.240.0070.07718.85
5.4.230.0070.08019.16
5.4.220.0000.05319.23
5.4.210.0100.07719.15
5.4.200.0100.07319.23
5.4.190.0070.04319.11
5.4.180.0130.04018.84
5.4.170.0100.07019.23
5.4.160.0070.07719.22
5.4.150.0070.05319.19
5.4.140.0070.03316.34
5.4.130.0070.04316.33
5.4.120.0030.05016.50
5.4.110.0130.04316.53
5.4.100.0000.06016.41
5.4.90.0070.04016.43
5.4.80.0030.06316.44
5.4.70.0030.07316.47
5.4.60.0100.04016.29
5.4.50.0070.03316.43
5.4.40.0000.04316.46
5.4.30.0030.03716.34
5.4.20.0000.04716.55
5.4.10.0030.04316.63
5.4.00.0000.04715.82
5.3.290.0100.06014.70
5.3.280.0070.06314.64
5.3.270.0030.04014.66
5.3.260.0030.07314.66
5.3.250.0030.05014.66
5.3.240.0030.03714.60
5.3.230.0070.03714.61
5.3.220.0100.04014.71
5.3.210.0070.03714.60
5.3.200.0030.04714.57
5.3.190.0100.03314.61
5.3.180.0070.03714.56
5.3.170.0070.04314.60
5.3.160.0000.08314.61
5.3.150.0000.04014.48
5.3.140.0070.03714.48
5.3.130.0100.07314.55
5.3.120.0070.03714.56
5.3.110.0070.06014.60
5.3.100.0070.05013.93
5.3.90.0030.05014.17
5.3.80.0070.04314.17
5.3.70.0070.04314.02
5.3.60.0100.03713.93
5.3.50.0070.05013.96
5.3.40.0130.07013.88
5.3.30.0030.03713.93
5.3.20.0070.04713.69
5.3.10.0000.04713.61
5.3.00.0030.04713.70
5.2.170.0100.03311.07
5.2.160.0000.06311.12
5.2.150.0030.05711.30
5.2.140.0070.03710.96
5.2.130.0070.03710.91
5.2.120.0030.03011.03
5.2.110.0000.03311.09
5.2.100.0030.03010.96
5.2.90.0030.06311.00
5.2.80.0070.06311.09
5.2.70.0070.06310.95
5.2.60.0030.05310.97
5.2.50.0000.03711.02
5.2.40.0070.03010.92
5.2.30.0030.05710.95
5.2.20.0030.03710.90
5.2.10.0030.03010.85
5.2.00.0100.06310.72
5.1.60.0030.05010.06
5.1.50.0000.04010.15
5.1.40.0130.03710.13
5.1.30.0100.05710.34
5.1.20.0030.04010.38
5.1.10.0000.03710.05
5.1.00.0030.05710.10
5.0.50.0070.0208.55
5.0.40.0000.0308.32
5.0.30.0070.0378.13
5.0.20.0000.0238.10
5.0.10.0000.0238.22
5.0.00.0030.0638.13
4.4.90.0000.0208.08
4.4.80.0030.0178.08
4.4.70.0030.0138.08
4.4.60.0000.0208.08
4.4.50.0000.0378.08
4.4.40.0030.0438.09
4.4.30.0000.0408.09
4.4.20.0030.0338.09
4.4.10.0000.0178.09
4.4.00.0100.0338.09
4.3.110.0000.0408.09
4.3.100.0030.0178.09
4.3.90.0000.0178.09
4.3.80.0030.0308.09
4.3.70.0030.0278.09
4.3.60.0030.0338.09
4.3.50.0030.0178.09
4.3.40.0000.0278.09
4.3.30.0070.0208.09
4.3.20.0000.0238.09
4.3.10.0030.0308.09
4.3.00.0000.0308.09

preferences:
80.98 ms | 401 KiB | 5 Q