3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div id="test"><p style="hello_world">This is a test.</p></div>'; $readmore = ' <a href="/foo/bar">Read More&hellip;</a>'; // Outputs: // '<div id="test"><p style="hello_world">This is a test.</p> <a href="/foo/bar">Read More&hellip;</a></div>' echo preg_replace('#</\w>\s*$#', $readmore .'$1', $html);

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.5.30.0090.00819.45
8.5.20.0110.01120.08
8.5.10.0100.00816.86
8.5.00.0130.00919.96
8.4.180.0130.00922.08
8.4.170.0120.00923.75
8.4.160.0130.00924.90
8.4.150.0060.00716.92
8.4.140.0120.00917.79
8.4.130.0160.00618.12
8.4.120.0110.00720.42
8.4.110.0150.00919.01
8.4.100.0060.00417.85
8.4.90.0140.00620.67
8.4.80.0110.00819.14
8.4.70.0040.00418.14
8.4.60.0140.00718.85
8.4.50.0190.00718.44
8.4.40.0100.01017.62
8.4.30.0050.00318.91
8.4.20.0120.00619.55
8.4.10.0080.00019.66
8.3.300.0090.01219.24
8.3.290.0110.00920.85
8.3.280.0090.01020.45
8.3.270.0100.00916.74
8.3.260.0120.00616.41
8.3.250.0140.00518.66
8.3.240.0120.00616.70
8.3.230.0090.01016.63
8.3.220.0110.00818.86
8.3.210.0110.01016.43
8.3.200.0050.00416.79
8.3.190.0120.00917.13
8.3.180.0100.01016.72
8.3.170.0000.01818.98
8.3.160.0000.00816.48
8.3.150.0110.00817.19
8.3.140.0070.00416.48
8.3.130.0120.00418.36
8.3.120.0030.00618.56
8.3.110.0060.00318.61
8.3.100.0060.00318.42
8.3.90.0080.00016.88
8.3.80.0200.01030.84
8.3.70.0290.00630.84
8.3.60.0310.00630.84
8.3.50.0030.01030.84
8.3.40.0160.00530.84
8.3.30.0200.00030.84
8.3.20.0150.00630.84
8.3.10.0320.00030.84
8.3.00.0160.00530.84
8.2.300.0150.00520.19
8.2.290.0110.00818.47
8.2.280.0080.01118.72
8.2.270.0150.00617.16
8.2.260.0160.00320.37
8.2.250.0040.00416.72
8.2.240.0000.00817.05
8.2.230.0040.00420.94
8.2.220.0080.00824.06
8.2.210.0070.00726.77
8.2.200.0130.01630.84
8.2.190.0300.00330.84
8.2.180.0310.00430.84
8.2.170.0320.01230.84
8.2.160.0250.01430.84
8.2.150.0430.00330.84
8.2.140.0330.01130.84
8.2.130.0330.01730.84
8.2.120.0480.00630.84
8.2.110.0460.00330.84
8.2.100.0250.00430.84
8.2.90.0250.00030.84
8.2.80.0150.00830.84
8.2.70.0290.00030.84
8.2.60.0420.00330.84
8.2.50.0410.00330.84
8.2.40.0320.01030.84
8.2.30.0340.00830.84
8.2.20.0380.00430.84
8.2.10.0390.00330.84
8.2.00.0290.00730.84
8.1.340.0110.00917.64
8.1.330.0120.00616.48
8.1.320.0060.00416.04
8.1.310.0060.00318.31
8.1.300.0060.00317.98
8.1.290.0140.01430.84
8.1.280.0180.00830.84
8.1.270.0280.00030.84
8.1.260.0220.00630.84
8.1.250.0320.00030.84
8.1.240.0250.00030.84
8.1.230.0200.00430.84
8.1.220.0170.00930.84
8.1.210.0270.01230.84
8.1.200.0400.00030.84
8.1.190.0200.00330.84
8.1.180.0210.00430.84
8.1.170.0130.01030.84
8.1.160.0230.00530.84
8.1.150.0170.00730.84
8.1.140.0200.01030.84
8.1.130.0300.00830.84
8.1.120.0240.01030.84
8.1.110.0170.00630.84
8.1.100.0240.00630.84
8.1.90.0150.00830.84
8.1.80.0150.00830.84
8.1.70.0200.00330.84
8.1.60.0210.00430.84
8.1.50.0150.00730.84
8.1.40.0210.00030.84
8.1.30.0090.01330.84
8.1.20.0190.00330.84
8.1.10.0180.00430.84
8.1.00.0180.00430.84

preferences:
42.74 ms | 984 KiB | 5 Q