3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Porcupines\nare\n\n\n\nporcupiney."; echo preg_replace('/(\r|\n|\r\n){2,}/', '<br/><br/>', $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.3.40.0070.01020.34
8.3.30.0180.00018.88
8.3.20.0030.00624.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.170.0040.01119.18
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0050.00326.35
8.2.110.0070.00320.53
8.2.100.0060.00618.03
8.2.90.0030.00517.60
8.2.80.0040.00418.88
8.2.70.0050.00317.88
8.2.60.0040.00417.75
8.2.50.0050.00318.10
8.2.40.0030.00619.53
8.2.30.0000.00819.27
8.2.20.0040.00418.11
8.2.10.0070.00019.11
8.2.00.0000.00819.13
8.1.270.0040.00423.99
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0040.00420.89
8.1.230.0070.00419.04
8.1.220.0040.00417.79
8.1.210.0080.00020.90
8.1.200.0040.00417.22
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0000.00919.04
8.1.150.0040.00418.84
8.1.140.0070.00018.78
8.1.130.0000.00720.07
8.1.120.0030.00317.49
8.1.110.0020.00517.55
8.1.100.0070.00017.50
8.1.90.0000.00717.60
8.1.80.0040.00417.52
8.1.70.0040.00417.55
8.1.60.0000.00817.64
8.1.50.0030.00617.64
8.1.40.0000.00717.64
8.1.30.0030.00517.71
8.1.20.0040.00417.66
8.1.10.0050.00317.57
8.1.00.0070.00317.63
8.0.300.0050.00219.82
8.0.290.0050.00317.00
8.0.280.0040.00418.43
8.0.270.0080.00016.88
8.0.260.0040.00418.39
8.0.250.0100.00017.14
8.0.240.0070.00017.13
8.0.230.0000.00617.09
8.0.220.0000.00716.87
8.0.210.0040.00416.95
8.0.200.0000.00717.11
8.0.190.0080.00017.05
8.0.180.0050.00316.88
8.0.170.0040.00417.02
8.0.160.0000.00717.07
8.0.150.0000.01016.81
8.0.140.0070.00016.93
8.0.130.0030.00313.33
8.0.120.0080.00016.93
8.0.110.0050.00216.96
8.0.100.0080.00017.00
8.0.90.0030.00517.05
8.0.80.0080.00917.00
8.0.70.0060.00316.86
8.0.60.0000.00716.87
8.0.50.0030.00416.99
8.0.30.0130.01017.23
8.0.20.0040.01517.23
8.0.10.0080.00017.05
8.0.00.0060.01416.99
7.4.330.0050.00015.55
7.4.320.0060.00016.78
7.4.300.0000.00616.77
7.4.290.0080.00016.64
7.4.280.0040.00416.71
7.4.270.0060.00316.76
7.4.260.0000.00613.46
7.4.250.0040.00416.71
7.4.240.0040.00416.71
7.4.230.0030.00316.79
7.4.220.0020.00516.70
7.4.210.0090.00716.73
7.4.200.0040.00416.73
7.4.130.0100.01016.71
7.4.120.0090.01416.49
7.4.110.0030.01416.59
7.4.100.0230.01216.57
7.4.90.0180.01116.81
7.4.80.0260.00816.50
7.4.70.0210.00916.61
7.4.60.0240.00716.52
7.4.50.0220.01116.38
7.4.40.0160.01616.61
7.4.30.0200.01416.58
7.4.20.0210.01116.62
7.4.10.0280.00416.74
7.4.00.0090.00916.67
7.3.330.0000.00716.35
7.3.320.0060.00013.03
7.3.310.0070.00016.17
7.3.300.0040.00416.31
7.3.290.0060.00816.32
7.3.260.0030.01316.63
7.3.230.0070.01016.15
7.3.220.0230.01016.58
7.3.210.0290.00316.53
7.3.200.0240.01516.68
7.3.190.0260.00716.54
7.3.180.0220.01116.25
7.3.170.0250.01116.30
7.3.160.0290.00616.45
7.3.150.0300.00616.30
7.3.140.0230.00816.48
7.3.130.0250.01116.48
7.3.120.0270.00316.16
7.3.110.0260.00716.61
7.3.100.0190.01316.31
7.3.90.0280.00616.36
7.3.80.0150.01816.54
7.3.70.0240.00816.45
7.3.60.0240.00616.51
7.3.50.0180.01316.37
7.3.40.0200.01316.48
7.3.30.0250.00916.42
7.3.20.0300.00716.54
7.3.10.0290.00716.44
7.3.00.0280.00616.39
7.2.330.0190.01316.61
7.2.320.0180.01816.84
7.2.310.0260.01416.69
7.2.300.0180.01216.64
7.2.290.0280.00616.68
7.2.280.0230.01016.68
7.2.270.0270.00316.49
7.2.260.0260.00716.67
7.2.250.0170.01316.70
7.2.240.0230.00816.68
7.2.230.0150.01516.52
7.2.220.0150.01816.46
7.2.210.0270.00516.52
7.2.200.0160.01616.72
7.2.190.0220.01316.54
7.2.180.0270.00416.55
7.2.170.0240.01616.66
7.2.160.0230.01316.71
7.2.150.0130.02116.71
7.2.140.0300.00316.59
7.2.130.0300.01016.69
7.2.120.0210.01116.71
7.2.110.0180.02216.65
7.2.100.0230.00916.59
7.2.90.0110.02216.77
7.2.80.0230.01016.67
7.2.70.0270.00516.77
7.2.60.0290.00316.82
7.2.50.0230.00816.70
7.2.40.0270.00716.79
7.2.30.0190.01516.59
7.2.20.0250.00716.60
7.2.10.0200.01216.60
7.2.00.0240.00616.73

preferences:
57.91 ms | 400 KiB | 5 Q