3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'DATA<td class="td1">DATA'; $pattern = '@<\w+(\s+[^>]*)>@is'; echo preg_replace($pattern, '$1', $string); echo PHP_EOL; echo str_replace('<td class="td1">', ' class="td1"', $string);

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.4.140.0100.01417.51
8.4.130.0110.00720.32
8.4.120.0030.00617.83
8.4.110.0060.01225.66
8.4.100.0150.00617.74
8.4.90.0070.00620.75
8.4.80.0080.01118.81
8.4.70.0070.01219.00
8.4.60.0050.00418.97
8.4.50.0030.00818.64
8.4.40.0080.00018.21
8.4.30.0120.00620.88
8.4.20.0100.00719.73
8.4.10.0160.00321.89
8.3.270.0130.00816.57
8.3.260.0110.00816.77
8.3.250.0070.00316.67
8.3.240.0130.00616.71
8.3.230.0150.00416.69
8.3.220.0020.00518.84
8.3.210.0100.00916.71
8.3.200.0060.00316.80
8.3.190.0040.00418.69
8.3.180.0090.00918.75
8.3.170.0090.00018.92
8.3.160.0160.00316.57
8.3.150.0000.00816.98
8.3.140.0030.01218.43
8.3.130.0030.00618.38
8.3.120.0050.00520.64
8.3.110.0000.00816.75
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0050.00516.75
8.3.70.0160.00616.63
8.3.60.0090.00616.63
8.3.50.0130.00318.52
8.3.40.0120.00920.09
8.3.30.0000.01518.79
8.3.20.0040.00424.18
8.3.10.0030.00624.66
8.3.00.0030.00626.16
8.2.290.0110.00816.75
8.2.280.0120.00718.51
8.2.270.0110.00716.87
8.2.260.0030.00716.76
8.2.250.0030.00616.90
8.2.240.0080.00019.16
8.2.230.0090.00020.94
8.2.220.0120.00337.54
8.2.210.0080.00026.77
8.2.200.0060.00318.29
8.2.190.0150.00616.58
8.2.180.0100.00725.92
8.2.170.0070.00719.13
8.2.160.0070.01422.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0000.00926.16
8.2.120.0000.00726.16
8.2.110.0090.00021.16
8.2.100.0120.00017.91
8.2.90.0040.00417.74
8.2.80.0090.00018.89
8.2.70.0000.00917.75
8.2.60.0000.00917.75
8.2.50.0040.00418.05
8.2.40.0030.00620.20
8.2.30.0000.00718.13
8.2.20.0000.00919.25
8.2.10.0090.00018.08
8.2.00.0000.00719.22
8.1.330.0140.00516.10
8.1.320.0120.00717.83
8.1.310.0100.00716.52
8.1.300.0150.00318.68
8.1.290.0030.00630.84
8.1.280.0100.00625.92
8.1.270.0060.00324.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00723.63
8.1.230.0030.00922.73
8.1.220.0000.00818.67
8.1.210.0030.00619.01
8.1.200.0080.00017.48
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0000.00719.17
8.1.150.0000.00718.64
8.1.140.0040.00417.58
8.1.130.0000.00719.04
8.1.120.0050.00217.45
8.1.110.0000.00717.55
8.1.100.0100.00717.38
8.1.90.0100.00617.38
8.1.80.0100.00717.36
8.1.70.0100.00517.43
8.1.60.0140.00417.63
8.1.50.0060.01217.43
8.1.40.0190.00017.58
8.1.30.0130.00417.73
8.1.20.0120.00417.58
8.1.10.0160.00317.51
8.1.00.0110.00717.45
8.0.300.0040.00419.97
8.0.290.0040.00416.75
8.0.280.0040.00418.40
8.0.270.0030.00517.01
8.0.260.0030.00618.51
8.0.250.0030.00317.10
8.0.240.0070.00017.14
8.0.230.0120.00217.01
8.0.220.0120.00316.98
8.0.210.0110.00416.98
8.0.200.0110.00517.07
8.0.190.0110.00616.85
8.0.180.0100.00516.97
8.0.170.0110.00416.97
8.0.160.0100.00617.00
8.0.150.0110.00616.89
8.0.140.0150.00016.92
8.0.130.0090.00616.89
8.0.120.0120.00416.95
8.0.110.0090.00616.89
8.0.100.0120.00216.85
8.0.90.0080.00716.89
8.0.80.0070.00716.71
8.0.70.0130.00416.75
8.0.60.0100.00717.00
8.0.50.0120.00416.91
8.0.30.0130.00316.83
8.0.20.0130.00316.93
8.0.10.0120.00417.04
7.4.330.0030.00315.55
7.4.320.0000.00716.64
7.4.300.0120.00416.70
7.4.290.0090.00616.55
7.4.280.0180.00016.74
7.4.270.0140.00316.63
7.4.260.0120.00416.65
7.4.250.0090.00916.73
7.4.240.0080.00816.73
7.4.230.0090.00316.73
7.4.220.0080.00516.72
7.4.210.0080.00416.63
7.4.200.0100.00316.53
7.4.190.0130.00016.79
7.4.180.0110.00316.66
7.4.160.0130.00016.56
7.4.150.0130.00316.66
7.4.140.0110.00416.75
7.4.130.0000.01416.66
7.4.120.0050.00816.59
7.4.110.0110.00316.54
7.4.100.0110.00416.59
7.4.90.0120.00316.52
7.4.80.0120.00016.54
7.4.70.0130.00016.67
7.4.60.0110.00416.59
7.4.50.0100.00516.62
7.4.40.0110.00416.55
7.4.30.0030.01016.69
7.4.20.0070.00716.39
7.4.10.0090.00316.53
7.4.00.0080.00416.59

preferences:
30.15 ms | 403 KiB | 5 Q