3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Oele\nBoele\n\nDus Want\n\nBlaaaaaaaaaaaa"; $text = '<p>' . $text . '</p>'; $text = preg_replace('#\n\n#', '</p><p>', $text); $text = preg_replace('#\n#', '<br />', $text); $text = preg_replace('#><#', ">\n<", $text); echo $text;

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.0110.00418.85
8.3.30.0100.00318.79
8.3.20.0070.00020.33
8.3.10.0040.00423.43
8.3.00.0000.01020.82
8.2.170.0100.00722.96
8.2.160.0030.01020.41
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0100.00326.16
8.2.120.0030.00522.24
8.2.110.0060.00320.41
8.2.100.0060.00617.85
8.2.90.0000.00818.16
8.2.80.0030.00518.04
8.2.70.0030.00617.88
8.2.60.0040.00417.77
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0000.00818.14
8.2.20.0000.00717.77
8.2.10.0040.00417.95
8.2.00.0030.00517.93
8.1.270.0030.01223.78
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00422.20
8.1.230.0070.00320.90
8.1.220.0040.00417.74
8.1.210.0030.00518.93
8.1.200.0060.00617.38
8.1.190.0000.00917.53
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0000.00722.09
8.1.150.0000.00718.69
8.1.140.0000.00817.60
8.1.130.0000.00717.85
8.1.120.0040.00417.62
8.1.110.0000.00717.60
8.1.100.0040.00417.63
8.1.90.0070.00017.64
8.1.80.0070.00017.52
8.1.70.0000.00717.46
8.1.60.0000.00917.68
8.1.50.0080.00017.73
8.1.40.0080.00017.57
8.1.30.0030.00617.68
8.1.20.0030.00517.77
8.1.10.0040.00417.61
8.1.00.0040.00417.66
8.0.300.0040.00420.07
8.0.290.0030.00517.05
8.0.280.0070.00018.48
8.0.270.0070.00017.33
8.0.260.0040.00416.89
8.0.250.0040.00417.07
8.0.240.0070.00017.00
8.0.230.0040.00417.07
8.0.220.0030.00317.08
8.0.210.0000.00717.00
8.0.200.0070.00016.94
8.0.190.0040.00417.07
8.0.180.0040.00417.10
8.0.170.0030.00517.04
8.0.160.0040.00417.06
8.0.150.0030.00316.96
8.0.140.0000.00716.98
8.0.130.0000.00713.48
8.0.120.0040.00416.89
8.0.110.0050.00317.01
8.0.100.0070.00017.15
8.0.90.0040.00416.95
8.0.80.0100.00516.96
8.0.70.0050.00317.10
8.0.60.0030.00617.03
8.0.50.0040.00416.75
8.0.30.0140.01117.20
8.0.20.0090.00917.40
8.0.10.0000.00717.10
8.0.00.0050.01316.93
7.4.330.0000.00615.00
7.4.320.0070.00016.51
7.4.300.0040.00416.58
7.4.290.0050.00316.66
7.4.280.0080.00016.59
7.4.270.0000.00716.76
7.4.260.0030.00316.76
7.4.250.0040.00416.63
7.4.240.0040.00416.72
7.4.230.0070.00016.68
7.4.220.0140.00416.68
7.4.210.0080.00816.72
7.4.200.0000.00716.77
7.4.190.0080.00016.75
7.4.160.0030.01316.77
7.4.150.0120.00617.40
7.4.140.0130.00717.86
7.4.130.0100.00916.77
7.4.120.0120.00816.53
7.4.110.0060.01116.63
7.4.100.0130.01016.81
7.4.90.0040.01416.56
7.4.80.0070.01016.80
7.4.70.0030.01316.76
7.4.60.0070.01016.57
7.4.50.0000.00816.59
7.4.40.0090.00922.77
7.4.30.0100.00716.59
7.4.00.0050.01214.96
7.3.330.0000.00513.25
7.3.320.0000.00513.33
7.3.310.0040.00416.29
7.3.300.0030.00316.40
7.3.290.0110.00316.45
7.3.280.0100.00716.44
7.3.270.0030.01417.40
7.3.260.0100.00616.44
7.3.250.0100.00916.71
7.3.240.0130.00316.45
7.3.230.0090.00616.39
7.3.210.0060.01016.71
7.3.200.0080.00819.39
7.3.190.0090.01216.30
7.3.180.0110.00516.40
7.3.170.0120.00716.41
7.3.160.0100.00816.32
7.3.120.0080.00915.00
7.3.110.0160.00314.72
7.3.100.0070.01114.96
7.3.90.0110.00314.90
7.3.80.0060.01215.11
7.3.70.0030.00915.10
7.3.60.0100.00014.93
7.3.50.0000.01514.81
7.3.40.0030.00614.93
7.3.30.0060.00915.09
7.3.20.0150.00016.91
7.3.10.0090.00916.71
7.3.00.0110.00316.73
7.2.330.0140.00316.75
7.2.320.0060.01216.50
7.2.310.0060.01216.84
7.2.300.0130.00916.63
7.2.290.0140.00816.71
7.2.250.0080.01115.23
7.2.240.0100.01015.34
7.2.230.0000.01714.84
7.2.220.0030.00915.32
7.2.210.0040.00815.05
7.2.200.0060.00915.04
7.2.190.0080.00415.13
7.2.180.0000.01415.42
7.2.170.0060.00915.26
7.2.60.0090.00317.29
7.2.00.0070.00719.34
7.1.330.0100.00315.60
7.1.320.0120.00315.70
7.1.310.0100.00015.75
7.1.300.0060.00615.84
7.1.290.0090.00015.98
7.1.280.0070.01016.15
7.1.270.0080.00315.75
7.1.260.0050.00515.78
7.1.200.0000.01215.81
7.1.100.0040.00418.14
7.1.70.0000.01117.14
7.1.60.0140.01119.29
7.1.50.0060.01317.34
7.1.00.0030.07722.41
7.0.200.0070.00017.08
7.0.140.0000.07722.01
7.0.60.0030.08719.79
7.0.50.0000.04317.80
7.0.40.0030.05720.07
7.0.30.0230.04020.18
7.0.20.0270.05320.18
7.0.10.0330.07320.11
7.0.00.0070.05020.17
5.6.280.0100.06721.02
5.6.210.0000.08720.62
5.6.200.0030.04318.19
5.6.190.0030.04320.39
5.6.180.0070.07720.61
5.6.170.0300.06020.41
5.6.160.0100.08720.54
5.6.150.0100.06718.16
5.6.140.0100.07018.09
5.6.130.0170.06318.11
5.6.120.0030.04321.09
5.6.110.0030.08720.89
5.6.100.0070.08321.10
5.6.90.0000.04320.95
5.6.80.0100.07020.28
5.5.350.0070.08320.39
5.5.340.0000.04017.91
5.5.330.0030.04320.23
5.5.320.0030.04020.28
5.5.310.0370.07320.32
5.5.300.0070.04317.98
5.5.290.0100.06317.99
5.5.280.0030.06020.88
5.5.270.0100.06720.95
5.5.260.0200.07720.88
5.5.250.0130.07720.77
5.5.240.0000.04020.18
5.4.450.0470.05319.39
5.4.440.0870.06019.64
5.4.430.0970.06719.27
5.4.420.0770.06019.59
5.4.410.0930.06719.14
5.4.400.1070.06319.12
5.4.390.0870.06719.00
5.4.380.0330.04318.53
5.4.370.0270.05018.72
5.4.360.0330.04318.61
5.4.350.0230.05318.69
5.4.340.0270.05718.46
5.4.320.0060.03812.45
5.4.310.0070.04212.45
5.4.300.0050.04712.45
5.4.290.0070.04212.45
5.4.280.0060.05812.33
5.4.270.0120.05712.32
5.4.260.0100.05212.33
5.4.250.0090.05012.32
5.4.240.0110.04612.33
5.4.230.0110.05712.32
5.4.220.0130.05112.32
5.4.210.0080.04812.32
5.4.200.0110.04812.32
5.4.190.0100.04812.32
5.4.180.0160.04212.31
5.4.170.0110.04812.32
5.4.160.0110.05012.32
5.4.150.0090.05112.32
5.4.140.0080.05612.00
5.4.130.0060.05011.99
5.4.120.0080.03611.95
5.4.110.0120.03211.94
5.4.100.0080.04511.95
5.4.90.0080.03711.95
5.4.80.0090.04511.94
5.4.70.0090.04011.94
5.4.60.0070.04911.94
5.4.50.0100.04311.94
5.4.40.0060.03611.93
5.4.30.0060.03911.93
5.4.20.0030.03811.93
5.4.10.0070.03411.92
5.4.00.0050.03711.42
5.3.290.0080.03812.80
5.3.280.0090.03512.70
5.3.270.0080.03812.73
5.3.260.0100.05212.72
5.3.250.0080.03812.72
5.3.240.0080.03712.72
5.3.230.0090.03912.71
5.3.220.0080.03812.68
5.3.210.0070.03912.68
5.3.200.0040.04012.68
5.3.190.0050.05012.68
5.3.180.0070.03812.68
5.3.170.0060.03612.67
5.3.160.0070.03512.68
5.3.150.0070.04312.67
5.3.140.0090.04212.66
5.3.130.0080.04812.66
5.3.120.0070.03912.66
5.3.110.0140.04812.66
5.3.100.0040.04012.12
5.3.90.0060.03712.08
5.3.80.0080.03412.07
5.3.70.0060.03612.07
5.3.60.0060.03912.06
5.3.50.0040.03712.00
5.3.40.0040.03812.00
5.3.30.0060.03511.94
5.3.20.0080.03411.71
5.3.10.0050.03711.68
5.3.00.0020.04111.67
5.2.170.0040.0319.16
5.2.160.0030.0319.16
5.2.150.0060.0299.16
5.2.140.0050.0319.15
5.2.130.0040.0319.12
5.2.120.0070.0279.12
5.2.110.0060.0319.12
5.2.100.0070.0289.13
5.2.90.0050.0419.12
5.2.80.0030.0459.13
5.2.70.0080.0459.12
5.2.60.0070.0319.07
5.2.50.0050.0429.04
5.2.40.0070.0339.02
5.2.30.0070.0419.00
5.2.20.0060.0378.99
5.2.10.0050.0458.90
5.2.00.0080.0398.76
5.1.60.0050.0288.04
5.1.50.0080.0248.04
5.1.40.0030.0378.02
5.1.30.0040.0288.38
5.1.20.0040.0288.40
5.1.10.0050.0268.12
5.1.00.0050.0358.12
5.0.50.0060.0266.60
5.0.40.0050.0216.46
5.0.30.0030.0326.27
5.0.20.0040.0196.24
5.0.10.0040.0196.22
5.0.00.0050.0316.21
4.4.90.0060.0224.78
4.4.80.0030.0214.75
4.4.70.0030.0174.76
4.4.60.0040.0154.75
4.4.50.0040.0234.77
4.4.40.0030.0274.71
4.4.30.0050.0214.76
4.4.20.0040.0224.85
4.4.10.0040.0214.85
4.4.00.0030.0354.76
4.3.110.0030.0184.67
4.3.100.0040.0204.66
4.3.90.0040.0204.63
4.3.80.0010.0344.59
4.3.70.0050.0184.63
4.3.60.0020.0204.63
4.3.50.0050.0154.63
4.3.40.0030.0334.54
4.3.30.0040.0193.27
4.3.20.0030.0173.25
4.3.10.0040.0163.22
4.3.00.0100.01313.14

preferences:
36.53 ms | 400 KiB | 5 Q