3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( 'First line<br>second line<br>third line', 'First line <br>second line <br>third line', 'First line<br> second line<br> third line', 'First line <br> second line <br> third line', 'First line <br> second line<br>third line', 'First line <br> second line <br>third line', 'First line<br>second line <br> third line', 'First line <br> second line<br> third line', 'First line<br> second line <br> third line', 'First line<br/>second line<br/>third line', 'First line <br/>second line <br/>third line', 'First line<br/> second line<br/> third line', 'First line <br/> second line <br/> third line', 'First line <br/> second line<br/>third line', 'First line <br/> second line <br/>third line', 'First line<br/>second line <br/> third line', 'First line <br/> second line<br/> third line', 'First line<br/> second line <br/> third line', 'First line<br />second line<br />third line', 'First line <br />second line <br />third line', 'First line<br /> second line<br /> third line', 'First line <br /> second line <br /> third line', 'First line <br /> second line<br />third line', 'First line <br /> second line <br />third line', 'First line<br />second line <br /> third line', 'First line <br /> second line<br /> third line', 'First line<br /> second line <br /> third line', 'First line<br class="hide-on-mobile" /> second line <br class="hide-on-mobile" /> third line', ); foreach ( $tests as $test ) { echo preg_replace( '/(\s)?<br(.*?)>(\s)?/', ' ', $test ), PHP_EOL; }

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.0110.00718.68
8.3.50.0110.00418.63
8.3.40.0060.00918.98
8.3.30.0110.00718.82
8.3.20.0000.00824.18
8.3.10.0090.00024.66
8.3.00.0080.00026.16
8.2.180.0060.00925.92
8.2.170.0040.01119.26
8.2.160.0110.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0100.00018.98
8.2.110.0060.00321.15
8.2.100.0110.00018.03
8.2.90.0050.00317.97
8.2.80.0000.00817.97
8.2.70.0000.00817.88
8.2.60.0060.00317.50
8.2.50.0050.00317.59
8.2.40.0030.00618.09
8.2.30.0040.00418.16
8.2.20.0050.00220.49
8.2.10.0000.00717.99
8.2.00.0070.00019.35
8.1.280.0110.00825.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.45
8.1.230.0060.00621.10
8.1.220.0030.00617.76
8.1.210.0050.00318.83
8.1.200.0050.00317.48
8.1.190.0040.00417.36
8.1.180.0030.00619.26
8.1.170.0060.00317.62
8.1.160.0040.00418.86
8.1.150.0050.00318.73
8.1.140.0000.00917.68
8.1.130.0030.00318.95
8.1.120.0050.00317.49
8.1.110.0040.00417.61
8.1.100.0080.00017.68
8.1.90.0040.00717.61
8.1.80.0040.00417.66
8.1.70.0040.00817.57
8.1.60.0120.00617.72
8.1.50.0110.00817.58
8.1.40.0160.00317.63
8.1.30.0130.00617.77
8.1.20.0100.00517.72
8.1.10.0100.00717.61
8.1.00.0150.00417.57
8.0.300.0040.00419.87
8.0.290.0040.00417.13
8.0.280.0050.00318.49
8.0.270.0030.00317.31
8.0.260.0080.00018.49
8.0.250.0030.00517.14
8.0.240.0060.00317.02
8.0.230.0050.00517.07
8.0.220.0040.00416.95
8.0.210.0070.00016.95
8.0.200.0060.01116.96
8.0.190.0090.00516.99
8.0.180.0120.00517.02
8.0.170.0150.00016.93
8.0.160.0120.00416.97
8.0.150.0150.00016.85
8.0.140.0090.00617.01
8.0.130.0100.00517.07
8.0.120.0090.00617.02
8.0.110.0100.00516.98
8.0.100.0110.00416.89
8.0.90.0060.00917.05
8.0.80.0160.00017.04
8.0.70.0080.00817.04
8.0.60.0150.00016.84
8.0.50.0050.01016.96
8.0.30.0050.01016.97
8.0.20.0110.00416.89
8.0.10.0130.00317.18
7.4.330.0000.00515.55
7.4.320.0060.00016.85
7.4.300.0130.00416.79
7.4.290.0160.00216.68
7.4.280.0040.01316.77
7.4.270.0110.00316.60
7.4.260.0100.00516.80
7.4.250.0110.00416.69
7.4.240.0130.00616.67
7.4.230.0140.00016.71
7.4.220.0080.00616.63
7.4.210.0050.00816.70
7.4.200.0110.00416.81
7.4.190.0150.00016.76
7.4.180.0130.00316.80
7.4.160.0100.00516.73
7.4.150.0120.00316.87
7.4.140.0080.00816.75
7.4.130.0040.01216.85
7.4.120.0100.00516.61
7.4.110.0100.00316.65
7.4.100.0070.00716.80
7.4.90.0090.00516.70
7.4.80.0050.01016.70
7.4.70.0080.00816.75
7.4.60.0100.00316.61
7.4.50.0070.00716.55
7.4.40.0100.00516.54
7.4.30.0070.00716.54
7.4.20.0060.00616.53
7.4.10.0050.00616.55
7.4.00.0040.00716.52

preferences:
51.54 ms | 401 KiB | 5 Q