3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "There are many \r variations of passages\r of Lorem Ipsum available,\r but the majority have suffered\r alteration in some form.\r "; echo preg_replace('/\r\n(?!$)/','"\r\n"',$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.4.140.0110.01117.91
8.4.130.0080.01219.58
8.4.120.0140.00620.52
8.4.110.0070.01222.64
8.4.100.0110.01017.78
8.4.90.0150.00617.97
8.4.80.0060.00419.46
8.4.70.0120.00818.00
8.4.60.0120.00818.62
8.4.50.0050.01018.11
8.4.40.0130.00619.68
8.4.30.0130.00720.38
8.4.20.0000.01017.88
8.4.10.0130.00619.88
8.3.270.0120.00716.48
8.3.260.0120.00816.61
8.3.250.0120.00718.84
8.3.240.0130.00816.42
8.3.230.0120.00816.73
8.3.220.0100.00917.18
8.3.210.0080.00916.62
8.3.200.0040.00516.70
8.3.190.0080.00518.61
8.3.180.0090.00816.98
8.3.170.0130.00719.01
8.3.160.0040.01220.19
8.3.150.0100.01016.61
8.3.140.0120.00317.17
8.3.130.0030.00518.29
8.3.120.0060.00320.74
8.3.110.0050.00320.94
8.3.100.0050.00316.55
8.3.90.0080.00026.77
8.3.80.0060.00319.36
8.3.70.0110.00716.50
8.3.60.0140.00718.27
8.3.50.0070.00924.52
8.3.40.0000.01618.93
8.3.30.0120.00318.82
8.3.20.0040.00420.86
8.3.10.0040.00422.04
8.3.00.0070.00023.66
8.2.290.0130.00620.29
8.2.280.0100.00820.16
8.2.270.0070.01117.19
8.2.260.0030.00618.57
8.2.250.0110.00718.58
8.2.240.0040.01117.21
8.2.230.0040.01522.58
8.2.220.0000.01637.54
8.2.210.0080.00026.77
8.2.200.0030.00618.88
8.2.190.0060.01218.29
8.2.180.0140.00716.63
8.2.170.0110.00422.96
8.2.160.0070.01122.23
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00021.07
8.2.110.0070.00322.31
8.2.100.0080.00419.64
8.2.90.0030.00519.28
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0050.00319.82
8.2.20.0040.00418.07
8.2.10.0000.00719.13
8.2.00.0040.00419.07
8.1.330.0160.00721.71
8.1.320.0100.00916.24
8.1.310.0070.01118.33
8.1.300.0060.00318.21
8.1.290.0090.00030.84
8.1.280.0090.01125.92
8.1.270.0040.00422.52
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.37
8.1.230.0070.00417.64
8.1.220.0040.00417.76
8.1.210.0000.00818.77
8.1.200.0000.00917.36
8.1.190.0080.00017.23
8.1.180.0030.00618.10
8.1.170.0000.00818.78
8.1.160.0070.00018.79
8.1.150.0030.00319.10
8.1.140.0070.00020.73
8.1.130.0030.00320.14
8.1.120.0000.00717.57
8.1.110.0020.00517.52
8.1.100.0080.00017.43
8.1.90.0070.00017.43
8.1.80.0040.00417.51
8.1.70.0000.00717.52
8.1.60.0050.00317.55
8.1.50.0090.00317.61
8.1.40.0030.00617.61
8.1.30.0040.00417.70
8.1.20.0000.00817.61
8.1.10.0050.00217.64
8.1.00.0040.00417.49
8.0.300.0060.00318.77
8.0.290.0030.00616.75
8.0.280.0060.00018.37
8.0.270.0000.00818.07
8.0.260.0040.00420.07
8.0.250.0030.00316.96
8.0.240.0040.00417.14
8.0.230.0000.01016.93
8.0.220.0040.00416.91
8.0.210.0000.00716.98
8.0.200.0050.00217.04
8.0.190.0040.00416.93
8.0.180.0000.00817.01
8.0.170.0090.00017.00
8.0.160.0040.00417.02
8.0.150.0000.00716.97
8.0.140.0000.00716.97
8.0.130.0030.00313.28
8.0.120.0000.00716.93
8.0.110.0000.00816.80
8.0.100.0000.00717.00
8.0.90.0000.00917.04
8.0.80.0090.00716.90
8.0.70.0070.00016.86
8.0.60.0050.00216.88
8.0.50.0000.00717.01
8.0.30.0040.01217.20
8.0.20.0050.01317.11
8.0.10.0040.00416.98
8.0.00.0030.01316.93
7.4.330.0030.00316.88
7.4.320.0000.00716.57
7.4.300.0000.00616.75
7.4.290.0030.00316.66
7.4.280.0040.00416.73
7.4.270.0100.00316.67
7.4.260.0030.00313.45
7.4.250.0000.00716.71
7.4.240.0040.00416.72
7.4.230.0030.00316.48
7.4.220.0020.00516.52
7.4.210.0110.00616.79
7.4.200.0040.00416.61
7.4.130.0100.00716.71
7.4.120.0130.01016.87
7.4.110.0130.00616.66
7.4.100.0120.00616.53
7.4.90.0100.00616.67
7.4.80.0100.00719.39
7.4.70.0090.00616.52
7.4.60.0070.01116.72
7.4.50.0120.00316.50
7.4.40.0060.01016.44
7.4.10.0070.00914.99
7.4.00.0030.00914.64
7.3.330.0030.00616.21
7.3.320.0030.00313.21
7.3.310.0030.00316.13
7.3.300.0000.00716.14
7.3.290.0100.00716.32
7.3.260.0120.01216.32
7.3.240.0130.00416.53
7.3.230.0080.00816.32
7.3.210.0130.00316.39
7.3.200.0130.01016.23
7.3.190.0090.00616.58
7.3.180.0100.01416.30
7.3.170.0100.00616.20
7.3.160.0060.01116.54
7.3.130.0120.00914.91
7.3.120.0040.01114.91
7.3.110.0080.00514.61
7.3.100.0120.00014.56
7.3.90.0130.00314.56
7.3.80.0080.00414.82
7.3.70.0070.01014.50
7.3.60.0090.00314.75
7.3.50.0060.00614.56
7.3.40.0090.00614.74
7.3.30.0000.01714.75
7.3.20.0030.01014.51
7.3.10.0070.00714.71
7.3.00.0030.01014.69
7.2.330.0060.01216.55
7.2.320.0140.00316.70
7.2.310.0100.00616.59
7.2.300.0110.00716.64
7.2.290.0080.01116.60
7.2.260.0030.01215.20
7.2.250.0060.00615.00
7.2.240.0070.01014.75
7.2.230.0000.01414.95
7.2.220.0070.01014.83
7.2.210.0040.01114.92
7.2.200.0070.00715.11
7.2.190.0120.00414.78
7.2.180.0060.00614.89
7.2.170.0160.00014.99
7.2.160.0100.00314.89
7.2.150.0090.00615.03
7.2.140.0040.01215.17
7.2.130.0090.00414.79
7.2.120.0070.00714.79
7.2.110.0070.00715.14
7.2.100.0080.00614.95
7.2.90.0070.00715.23
7.2.80.0070.00714.73
7.2.70.0080.00814.96
7.2.60.0060.00814.92
7.2.50.0040.01114.85
7.2.40.0040.01115.13
7.2.30.0060.00814.98
7.2.20.0080.00514.94
7.2.10.0090.00615.04
7.2.00.0080.00815.08

preferences:
32.65 ms | 403 KiB | 5 Q