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"; echo preg_replace_callback( '@(<br[^>]*+>)|\s?</?+p>\s?|(?<=<t(?:r|d))[^>]*+(?=>)@', function ($matches) { return isset($matches[1]) ? '、' : ''; }, $text1 ); echo "\n[RESULT 2]\n"; echo preg_replace_callback( '@(<br[^>]*+>)|\s*+</?+p>\s*+|(?<=<t(?:r|d))[^>]*+(?=>)@', 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.0040.01416.75
8.3.50.0100.01022.18
8.3.40.0070.00719.04
8.3.30.0030.01418.98
8.3.20.0050.00320.33
8.3.10.0040.00423.48
8.3.00.0040.00420.64
8.2.180.0120.00916.63
8.2.170.0060.01022.96
8.2.160.0100.00322.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00422.20
8.2.110.0030.00622.20
8.2.100.0070.00417.97
8.2.90.0050.00319.22
8.2.80.0040.00418.05
8.2.70.0030.00917.63
8.2.60.0030.00618.05
8.2.50.0090.00318.07
8.2.40.0050.00318.34
8.2.30.0050.00318.19
8.2.20.0040.00417.95
8.2.10.0020.00518.00
8.2.00.0040.00417.91
8.1.280.0140.00425.92
8.1.270.0040.00422.27
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00323.85
8.1.230.0080.00319.08
8.1.220.0040.00417.76
8.1.210.0080.00018.77
8.1.200.0040.00417.48
8.1.190.0040.00417.55
8.1.180.0030.00618.10
8.1.170.0000.00818.63
8.1.160.0020.00521.97
8.1.150.0050.00318.81
8.1.140.0080.00017.54
8.1.130.0000.00717.87
8.1.120.0040.00417.66
8.1.110.0000.00817.61
8.1.100.0000.00717.59
8.1.90.0000.00717.54
8.1.80.0030.00317.68
8.1.70.0000.00717.58
8.1.60.0090.00017.80
8.1.50.0050.00317.61
8.1.40.0060.00317.71
8.1.30.0060.00317.73
8.1.20.0060.00317.73
8.1.10.0030.00617.60
8.1.00.0030.00617.68
8.0.300.0040.00418.77
8.0.290.0000.00717.16
8.0.280.0000.00818.49
8.0.270.0040.00417.30
8.0.260.0000.00716.98
8.0.250.0000.00717.14
8.0.240.0040.00417.20
8.0.230.0040.00417.10
8.0.220.0000.00717.02
8.0.210.0040.00416.98
8.0.200.0070.00017.25
8.0.190.0000.00817.25
8.0.180.0040.00417.17
8.0.170.0040.00417.21
8.0.160.0080.00017.14
8.0.150.0000.00717.02
8.0.140.0050.00217.05
8.0.130.0000.00613.70
8.0.120.0050.00317.10
8.0.110.0040.00417.01
8.0.100.0000.00717.22
8.0.90.0000.00917.18
8.0.80.0190.00017.14
8.0.70.0020.00517.16
8.0.60.0040.00317.00
8.0.50.0050.00217.03
8.0.30.0120.00717.41
8.0.20.0030.01517.40
8.0.10.0000.00717.11
8.0.00.0080.01316.97
7.4.330.0000.00515.03
7.4.320.0070.00016.82
7.4.300.0060.00016.84
7.4.290.0070.00016.64
7.4.280.0090.00016.87
7.4.270.0040.00416.84
7.4.260.0050.00316.66
7.4.250.0000.00716.79
7.4.240.0060.00216.67
7.4.230.0030.00316.74
7.4.220.0100.01616.85
7.4.210.0090.00716.87
7.4.200.0000.00716.74
7.4.190.0070.00016.70
7.4.160.0140.00316.86
7.4.150.0140.00317.40
7.4.140.0110.01117.86
7.4.130.0080.01116.70
7.4.120.0110.00616.78
7.4.110.0140.00316.82
7.4.100.0090.01316.67
7.4.90.0120.01416.73
7.4.80.0000.01816.82
7.4.70.0040.01716.81
7.4.60.0060.00916.76
7.4.50.0030.00516.55
7.4.40.0070.00722.77
7.4.30.0110.00716.70
7.4.00.0100.00715.27
7.3.330.0000.00513.40
7.3.320.0020.00313.54
7.3.310.0030.00316.61
7.3.300.0030.00316.42
7.3.290.0030.01016.61
7.3.280.0070.00916.62
7.3.270.0110.00817.40
7.3.260.0110.00616.85
7.3.250.0110.00816.77
7.3.240.0140.01016.82
7.3.230.0120.01216.77
7.3.210.0030.01416.46
7.3.200.0160.00619.39
7.3.190.0200.00016.82
7.3.180.0080.00816.50
7.3.170.0080.01716.53
7.3.160.0130.00316.62
7.3.120.0070.00714.93
7.2.330.0090.00916.69
7.2.320.0080.00816.82
7.2.310.0140.00316.84
7.2.300.0100.00616.73
7.2.290.0040.01316.91
7.2.60.0080.00617.16
7.2.00.0070.01019.52
7.1.200.0150.00016.00
7.1.100.0070.00718.02
7.1.70.0050.00217.28
7.1.60.0160.00919.27
7.1.50.0000.02116.81
7.1.00.0030.07722.60
7.0.200.0080.00416.99
7.0.140.0000.07721.96
7.0.60.0030.04019.85
7.0.50.0230.06317.98
7.0.40.0070.06320.20
7.0.30.0300.07320.32
7.0.20.0130.04720.29
7.0.10.0170.09020.28
7.0.00.0070.04020.19
5.6.280.0030.07320.87
5.6.210.0000.06320.47
5.6.200.0100.03718.27
5.6.190.0070.08720.57
5.6.180.0400.05720.57
5.6.170.0300.08020.52
5.6.160.0000.04720.45
5.6.150.0070.07018.15
5.6.140.0100.04018.15
5.6.130.0030.08718.16
5.6.120.0070.08720.92
5.6.110.0100.03721.05
5.6.100.0070.06720.95
5.6.90.0100.06721.01
5.6.80.0130.07020.42
5.5.350.0000.05720.50
5.5.340.0100.05317.99
5.5.330.0070.04320.13
5.5.320.0070.04020.20
5.5.310.0270.07720.27
5.5.300.0100.07717.97
5.5.290.0070.04717.95
5.5.280.0070.05320.81
5.5.270.0100.08020.75
5.5.260.0070.05020.80
5.5.250.0070.08020.71
5.5.240.0070.05320.16
5.4.450.0630.03319.50
5.4.440.0870.05019.57
5.4.430.0670.05719.67
5.4.420.0700.05719.41
5.4.410.0700.06318.93
5.4.400.1130.06718.47
5.4.390.1200.05718.75
5.4.380.0170.05318.50
5.4.370.0170.05018.82
5.4.360.0070.06018.44
5.4.350.0170.05718.48
5.4.340.0130.05318.77
5.4.320.0050.03812.51
5.4.310.0090.04012.50
5.4.300.0080.03912.51
5.4.290.0080.03712.50
5.4.280.0040.03712.40
5.4.270.0060.03712.40
5.4.260.0040.03912.39
5.4.250.0040.03912.40
5.4.240.0080.04012.40
5.4.230.0010.04212.39
5.4.220.0090.03312.39
5.4.210.0080.03412.39
5.4.200.0050.04512.39
5.4.190.0160.04312.38
5.4.180.0140.04412.38
5.4.170.0140.04312.40
5.4.160.0190.04012.39
5.4.150.0250.06712.38
5.4.140.0170.04212.07
5.4.130.0140.04412.05
5.4.120.0140.04512.01
5.4.110.0140.04512.01
5.4.100.0170.04212.01
5.4.90.0100.04812.01
5.4.80.0170.04112.01
5.4.70.0170.04012.01
5.4.60.0180.03912.00
5.4.50.0150.04412.01
5.4.40.0150.04212.00
5.4.30.0130.04411.99
5.4.20.0190.04011.99
5.4.10.0300.09011.99
5.4.00.0130.04311.48
5.3.290.0100.03712.80
5.3.280.0070.04412.71
5.3.270.0200.04112.73
5.3.260.0130.04912.72
5.3.250.0160.04512.72
5.3.240.0130.04712.71
5.3.230.0130.04712.71
5.3.220.0160.04412.68
5.3.210.0190.04612.68
5.3.200.0530.07312.68
5.3.190.0260.05112.68
5.3.180.0300.09812.67
5.3.170.0140.04812.67
5.3.160.0290.06612.68
5.3.150.0170.04712.67
5.3.140.0180.04712.66
5.3.130.0230.04412.66
5.3.120.0160.04412.66
5.3.110.0140.05012.66
5.3.100.0150.04612.13
5.3.90.0180.04212.11
5.3.80.0190.04412.10
5.3.70.0170.04412.11
5.3.60.0140.04712.09
5.3.50.0170.04612.03
5.3.40.0150.04612.03
5.3.30.0160.04412.00
5.3.20.0180.04111.78
5.3.10.0170.04111.75
5.3.00.0200.04211.72
5.2.170.0240.0859.18
5.2.160.0130.0339.18
5.2.150.0170.0299.18
5.2.140.0110.0369.18
5.2.130.0120.0359.14
5.2.120.0080.0399.14
5.2.110.0120.0379.15
5.2.100.0090.0379.15
5.2.90.0100.0369.14
5.2.80.0120.0359.14
5.2.70.0100.0369.13
5.2.60.0150.0329.09
5.2.50.0130.0349.06
5.2.40.0140.0339.04
5.2.30.0120.0349.01
5.2.20.0080.0389.01
5.2.10.0130.0338.93
5.2.00.0140.0348.78
5.1.60.0110.0318.07
5.1.50.0110.0318.07
5.1.40.0100.0308.05
5.1.30.0170.0268.40
5.1.20.0100.0358.43
5.1.10.0090.0348.14
5.1.00.0090.0368.14
5.0.50.0080.0266.63
5.0.40.0080.0246.48
5.0.30.0090.0356.30
5.0.20.0090.0226.27
5.0.10.0070.0246.25
5.0.00.0080.0356.24
4.4.90.0060.0194.78
4.4.80.0060.0194.75
4.4.70.0060.0204.76
4.4.60.0090.0174.75
4.4.50.0080.0174.77
4.4.40.0060.0304.71
4.4.30.0040.0224.76
4.4.20.0080.0174.84
4.4.10.0060.0194.85
4.4.00.0060.0294.76
4.3.110.0070.0174.66
4.3.100.0050.0194.67
4.3.90.0060.0184.63
4.3.80.0050.0294.59
4.3.70.0060.0174.63
4.3.60.0050.0184.63
4.3.50.0070.0174.63
4.3.40.0050.0284.54
4.3.30.0070.0163.30
4.3.20.0030.0203.28
4.3.10.0050.0173.24
4.3.00.0130.01315.48

preferences:
43.47 ms | 401 KiB | 5 Q