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.0090.00918.55
8.3.50.0120.00522.11
8.3.40.0110.00418.88
8.3.30.0110.00319.09
8.3.20.0080.00020.16
8.3.10.0040.00423.51
8.3.00.0110.00017.84
8.2.180.0150.00016.63
8.2.170.0060.00922.96
8.2.160.0060.00920.57
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00322.43
8.2.110.0090.00019.23
8.2.100.0000.01217.97
8.2.90.0030.00517.98
8.2.80.0030.00517.97
8.2.70.0090.00017.93
8.2.60.0040.00418.04
8.2.50.0080.00018.10
8.2.40.0070.00320.55
8.2.30.0000.00818.10
8.2.20.0080.00018.05
8.2.10.0040.00418.25
8.2.00.0080.00317.92
8.1.280.0210.00025.92
8.1.270.0090.00022.18
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00322.55
8.1.230.0080.00420.99
8.1.220.0080.00017.78
8.1.210.0060.00318.97
8.1.200.0060.00317.48
8.1.190.0040.00717.48
8.1.180.0030.00618.10
8.1.170.0000.00818.69
8.1.160.0000.01121.97
8.1.150.0070.00018.85
8.1.140.0000.00717.63
8.1.130.0030.00617.84
8.1.120.0050.00317.51
8.1.110.0040.00417.68
8.1.100.0000.00817.53
8.1.90.0000.00717.68
8.1.80.0040.00417.57
8.1.70.0030.00317.60
8.1.60.0030.00517.58
8.1.50.0050.00317.71
8.1.40.0040.00417.66
8.1.30.0000.00817.76
8.1.20.0050.00317.85
8.1.10.0040.00417.59
8.1.00.0080.00017.71
8.0.300.0070.00019.98
8.0.290.0110.00017.00
8.0.280.0070.00018.48
8.0.270.0030.00317.21
8.0.260.0000.00717.28
8.0.250.0000.00717.25
8.0.240.0020.00517.20
8.0.230.0070.00017.13
8.0.220.0000.00717.00
8.0.210.0030.00516.98
8.0.200.0000.00717.17
8.0.190.0000.00717.19
8.0.180.0050.00217.09
8.0.170.0000.00817.19
8.0.160.0070.00017.30
8.0.150.0040.00417.11
8.0.140.0030.00617.20
8.0.130.0000.00613.60
8.0.120.0050.00317.18
8.0.110.0040.00417.22
8.0.100.0050.00217.20
8.0.90.0000.00817.21
8.0.80.0040.01217.23
8.0.70.0080.00017.13
8.0.60.0000.00717.20
8.0.50.0000.00717.24
8.0.30.0090.01117.21
8.0.20.0130.00717.45
8.0.10.0090.00017.10
8.0.00.0060.01116.95
7.4.330.0030.00315.00
7.4.320.0030.00316.83
7.4.300.0030.00316.75
7.4.290.0070.00016.63
7.4.280.0040.00416.72
7.4.270.0040.00416.81
7.4.260.0080.00016.76
7.4.250.0030.00516.75
7.4.240.0040.00416.64
7.4.230.0050.00316.57
7.4.220.0130.01016.85
7.4.210.0070.00816.76
7.4.200.0000.00816.53
7.4.190.0000.00716.94
7.4.160.0130.00316.86
7.4.150.0090.00917.40
7.4.140.0120.00517.86
7.4.130.0100.01116.86
7.4.120.0080.01016.76
7.4.110.0180.00616.70
7.4.100.0070.01416.78
7.4.90.0100.00716.80
7.4.80.0110.00619.39
7.4.70.0030.01316.95
7.4.60.0130.00316.65
7.4.50.0020.00216.62
7.4.40.0090.00322.77
7.4.30.0090.00616.62
7.4.10.0070.01016.68
7.4.00.0080.00815.75
7.3.330.0030.00313.61
7.3.320.0030.00313.40
7.3.310.0040.00416.49
7.3.300.0000.00716.51
7.3.290.0060.00916.51
7.3.280.0070.01316.61
7.3.270.0130.00517.40
7.3.260.0040.01316.68
7.3.250.0110.00916.54
7.3.240.0180.00416.44
7.3.230.0060.01216.73
7.3.210.0100.01016.43
7.3.200.0100.01319.39
7.3.190.0110.00816.85
7.3.180.0100.00716.84
7.3.170.0230.00016.65
7.3.160.0080.00816.54
7.3.130.0100.00716.60
7.3.120.0080.00915.70
7.3.110.0090.00616.70
7.3.100.0030.00916.46
7.3.90.0060.00616.67
7.3.80.0120.00016.41
7.3.70.0040.00816.61
7.3.60.0000.01016.52
7.3.50.0060.00916.49
7.3.40.0040.00816.44
7.3.30.0080.01216.61
7.3.20.0040.00818.28
7.3.10.0110.00718.25
7.3.00.0040.00718.26
7.2.330.0090.00916.64
7.2.320.0130.01016.76
7.2.310.0110.01116.59
7.2.300.0090.00816.78
7.2.290.0030.01316.88
7.2.260.0020.01516.80
7.2.250.0040.01816.75
7.2.240.0090.00916.83
7.2.230.0100.00616.76
7.2.220.0100.00716.72
7.2.210.0030.00816.57
7.2.200.0060.00316.54
7.2.190.0090.00916.58
7.2.180.0090.00316.76
7.2.170.0160.00616.58
7.2.160.0060.01116.61
7.2.150.0030.01418.47
7.2.140.0030.02018.51
7.2.130.0040.01118.49
7.2.120.0030.01018.60
7.2.110.0100.01018.41
7.2.100.0110.00918.55
7.2.90.0130.00318.55
7.2.80.0040.00718.53
7.2.70.0030.01718.63
7.2.60.0030.02018.29
7.2.50.0080.00818.63
7.2.40.0090.00618.69
7.2.30.0040.00818.63
7.2.20.0030.00718.51
7.2.10.0090.00318.53
7.2.00.0100.00818.76
7.1.330.0040.01117.64
7.1.320.0080.00817.54
7.1.310.0030.00717.64
7.1.300.0030.01117.54
7.1.290.0060.00917.30
7.1.280.0060.01217.56
7.1.270.0080.01217.46
7.1.260.0110.01117.34
7.1.250.0150.00317.32
7.1.240.0070.00717.54
7.1.230.0090.00617.29
7.1.220.0090.00617.24
7.1.210.0090.00617.48
7.1.200.0030.01217.34
7.1.190.0060.01217.36
7.1.180.0050.01017.51
7.1.170.0040.01117.54
7.1.160.0030.00917.57
7.1.150.0060.01017.34
7.1.140.0040.00717.46
7.1.130.0040.01117.47
7.1.120.0030.00917.48
7.1.110.0000.01417.43
7.1.100.0090.00717.66
7.1.90.0000.01117.39
7.1.80.0000.01017.34
7.1.70.0060.01017.26
7.1.60.0120.00818.42
7.1.50.0120.01226.29
7.1.40.0040.00717.40
7.1.30.0040.01517.38
7.1.20.0070.01017.48
7.1.10.0000.01317.46
7.1.00.0030.04319.89
7.0.330.0130.00317.03
7.0.320.0120.00016.99
7.0.310.0120.00017.23
7.0.300.0040.01117.07
7.0.290.0070.00717.00
7.0.280.0100.00017.05
7.0.270.0070.01017.13
7.0.260.0080.00317.18
7.0.250.0000.01217.08
7.0.240.0030.01317.23
7.0.230.0000.01417.23
7.0.220.0000.01317.20
7.0.210.0060.00917.22
7.0.200.0050.01017.18
7.0.190.0070.00717.09
7.0.180.0030.01017.05
7.0.170.0110.00417.20
7.0.160.0070.00717.12
7.0.150.0030.01117.07
7.0.140.0070.04019.44
7.0.130.0040.01117.15
7.0.120.0000.01716.97
7.0.110.0030.01017.12
7.0.100.0100.00317.20
7.0.90.0030.00816.96
7.0.80.0080.00816.70
7.0.70.0000.01416.95
7.0.60.0050.04318.50
7.0.50.0070.03317.52
7.0.40.0160.03717.48
7.0.30.0230.02917.69
7.0.20.0170.03017.71
7.0.10.0070.03017.65
7.0.00.0030.02817.63
5.6.400.0000.01415.94
5.6.390.0000.01015.81
5.6.380.0080.00815.98
5.6.370.0130.00316.14
5.6.360.0000.01415.99
5.6.350.0100.01016.20
5.6.340.0000.01016.00
5.6.330.0060.01216.32
5.6.320.0060.00916.04
5.6.310.0050.00515.72
5.6.300.0030.01515.72
5.6.290.0090.00916.14
5.6.280.0030.04318.47
5.6.270.0060.00616.18
5.6.260.0030.00915.92
5.6.250.0040.00716.05
5.6.240.0030.01315.89
5.6.230.0000.01615.61
5.6.220.0070.01116.07
5.6.210.0030.04718.41
5.6.200.0070.04216.99
5.6.190.0130.04218.34
5.6.180.0070.02218.24
5.6.170.0260.02218.11
5.6.160.0030.03018.12
5.6.150.0050.04916.98
5.6.140.0090.04417.08
5.6.130.0040.04416.95
5.6.120.0120.04018.48
5.6.110.0040.02818.45
5.6.100.0070.04518.55
5.6.90.0030.04718.64
5.6.80.0030.04518.07
5.6.70.2100.02318.17
5.6.60.0060.00615.70
5.6.50.0090.00015.86
5.6.40.0100.00315.95
5.6.30.0060.00315.70
5.6.20.0000.01115.73
5.6.10.0000.01415.68
5.6.00.0040.00715.90
5.5.380.0000.01215.86
5.5.370.0090.00015.60
5.5.360.0070.00715.80
5.5.350.0080.03618.13
5.5.340.0110.04117.04
5.5.330.0110.02718.15
5.5.320.0200.02317.92
5.5.310.0120.03318.11
5.5.300.0050.02316.84
5.5.290.0080.04216.94
5.5.280.0070.04818.28
5.5.270.0040.02418.31
5.5.260.0070.04518.14
5.5.250.0050.03818.24
5.5.240.0150.03817.97
5.5.230.0080.00515.66
5.5.220.0080.00415.70
5.5.210.0090.00315.55
5.5.200.0100.00715.82
5.5.190.0060.00315.73
5.5.180.0060.01015.70
5.5.170.0070.00715.80
5.5.160.0060.01215.54
5.5.150.0060.01015.81
5.5.140.0060.01315.81
5.5.130.0000.01815.90
5.5.120.0030.00715.98
5.5.110.0000.01315.81
5.5.100.0040.00715.80
5.5.90.0040.01115.84
5.5.80.0050.00515.61
5.5.70.0040.00815.52
5.5.60.0060.00915.73
5.5.50.0080.00615.70
5.5.40.0090.00015.53
5.5.30.0080.00315.42
5.5.20.0070.00715.59
5.5.10.0040.01115.78
5.5.00.0060.00915.58
5.4.450.0080.03516.26
5.4.440.0420.03715.95
5.4.430.0350.02916.20
5.4.420.0380.03216.12
5.4.410.0420.02816.11
5.4.400.0260.02615.78
5.4.390.0370.02815.79
5.4.380.0150.03215.75
5.4.370.0130.03315.72
5.4.360.0220.02515.61
5.4.350.0090.03415.61
5.4.340.0290.03215.58
5.4.330.0040.00412.70
5.4.320.0040.02412.60
5.4.310.0080.02112.60
5.4.300.0060.02312.60
5.4.290.0090.02112.69
5.4.280.0050.02512.55
5.4.270.0090.02212.55
5.4.260.0050.02612.55
5.4.250.0060.02212.55
5.4.240.0060.02112.61
5.4.230.0030.02812.54
5.4.220.0080.02112.54
5.4.210.0050.02012.54
5.4.200.0040.02212.54
5.4.190.0090.02712.54
5.4.180.0120.02412.54
5.4.170.0110.02512.54
5.4.160.0130.03612.54
5.4.150.0080.02712.54
5.4.140.0050.02912.38
5.4.130.0120.02412.38
5.4.120.0110.02412.37
5.4.110.0100.02512.35
5.4.100.0100.02512.35
5.4.90.0100.02512.35
5.4.80.0140.05112.42
5.4.70.0090.02312.37
5.4.60.0080.02412.35
5.4.50.0080.02612.44
5.4.40.0100.02112.38
5.4.30.0090.02312.41
5.4.20.0070.02612.34
5.4.10.0110.02212.34
5.4.00.0100.02312.09
5.3.290.0060.02712.99
5.3.280.0050.02412.92
5.3.270.0080.02812.98
5.3.260.0100.02512.98
5.3.250.0090.02612.96
5.3.240.0170.04912.85
5.3.230.0140.02512.88
5.3.220.0080.02612.83
5.3.210.0100.02712.83
5.3.200.0100.02712.87
5.3.190.0110.02512.86
5.3.180.0100.02712.89
5.3.170.0120.02413.03
5.3.160.0110.02512.89
5.3.150.0090.02712.88
5.3.140.0150.05112.82
5.3.130.0090.02612.88
5.3.120.0110.02812.88
5.3.110.0160.02212.87
5.3.100.0130.02512.63
5.3.90.0070.03012.58
5.3.80.0200.04712.48
5.3.70.0100.02612.54
5.3.60.0120.02612.58
5.3.50.0110.02512.50
5.3.40.0110.02512.54
5.3.30.0110.02112.58
5.3.20.0130.02212.42
5.3.10.0130.02012.31
5.3.00.0100.03712.30
5.2.170.0110.0389.19
5.2.160.0170.0299.18
5.2.150.0090.0389.18
5.2.140.0150.0629.18
5.2.130.0140.0329.14
5.2.120.0140.0329.14
5.2.110.0140.0349.15
5.2.100.0110.0369.14
5.2.90.0120.0349.14
5.2.80.0160.0649.13
5.2.70.0150.0339.13
5.2.60.0090.0399.09
5.2.50.0120.0359.05
5.2.40.0130.0339.04
5.2.30.0150.0329.01
5.2.20.0130.0339.02
5.2.10.0150.0318.93
5.2.00.0120.0348.79
5.1.60.0260.0438.07
5.1.50.0100.0318.07
5.1.40.0120.0278.06
5.1.30.0110.0318.40
5.1.20.0170.0558.43
5.1.10.0100.0328.14
5.1.00.0090.0318.14
5.0.50.0080.0256.64
5.0.40.0090.0236.49
5.0.30.0070.0386.30
5.0.20.0110.0206.28
5.0.10.0140.0176.25
5.0.00.0090.0346.24
4.4.90.0090.0164.78
4.4.80.0130.0414.76
4.4.70.0060.0194.75
4.4.60.0070.0184.75
4.4.50.0060.0194.77
4.4.40.0060.0304.71
4.4.30.0050.0214.76
4.4.20.0050.0204.85
4.4.10.0070.0174.84
4.4.00.0080.0274.76
4.3.110.0060.0184.67
4.3.100.0060.0184.66
4.3.90.0010.0234.63
4.3.80.0080.0264.58
4.3.70.0080.0164.63
4.3.60.0070.0174.63
4.3.50.0050.0194.63
4.3.40.0080.0264.54
4.3.30.0060.0193.29
4.3.20.0060.0193.29
4.3.10.0060.0163.24
4.3.00.0070.0277.80

preferences:
40.74 ms | 401 KiB | 5 Q