3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<STR Featuring six amazing National Parks: Glacier, Waterton Lakes, Yellowstone, Grand Teton, Arches, and Canyonlands. Your tour begins in Chicago where you will board the Empire Builder bound for the first National Park on your trip, Glacier, where you will explore the famed Going-to-the-Sun Road and enjoy a full-day excursion to Waterton Lakes National Park in Canada (passport required). STR; echo preg_replace('/(^|[^\R])\R(?!\R)/u', '', $str);

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.0100.01016.50
8.3.50.0150.00517.44
8.3.40.0150.00018.68
8.3.30.0110.00418.75
8.3.20.0040.00418.90
8.3.10.0000.00820.52
8.3.00.0100.01019.38
8.2.180.0070.01416.50
8.2.170.0090.00622.96
8.2.160.0030.01021.07
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0120.00622.26
8.2.100.0080.00317.97
8.2.90.0040.00417.75
8.2.80.0050.00317.97
8.2.70.0030.00518.04
8.2.60.0000.00817.91
8.2.50.0040.00419.65
8.2.40.0040.00420.55
8.2.30.0000.00718.14
8.2.20.0040.00417.70
8.2.10.0030.00517.55
8.2.00.0040.00417.65
8.1.280.0180.00025.92
8.1.270.0070.00024.66
8.1.260.0050.00226.35
8.1.250.0050.00328.09
8.1.240.0000.00920.39
8.1.230.0110.00021.04
8.1.220.0070.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00316.99
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0080.00018.51
8.1.160.0080.00018.74
8.1.150.0040.00418.43
8.1.140.0050.00317.32
8.1.130.0040.00417.84
8.1.120.0040.00417.32
8.1.110.0030.00617.40
8.1.100.0030.00317.43
8.1.90.0040.00417.32
8.1.80.0000.00717.31
8.1.70.0000.00817.33
8.1.60.0040.00417.41
8.1.50.0060.00317.37
8.1.40.0030.00617.46
8.1.30.0000.00717.55
8.1.20.0000.00817.50
8.1.10.0040.00417.38
8.1.00.0000.00717.39
8.0.300.0040.00421.89
8.0.290.0020.00516.75
8.0.280.0070.00018.55
8.0.270.0000.00717.17
8.0.260.0000.00616.94
8.0.250.0000.00717.02
8.0.240.0080.00016.88
8.0.230.0030.00316.96
8.0.220.0030.00316.89
8.0.210.0040.00416.81
8.0.200.0000.00716.82
8.0.190.0030.00516.95
8.0.180.0000.00716.89
8.0.170.0000.00816.97
8.0.160.0000.00816.89
8.0.150.0080.00016.87
8.0.140.0060.00616.75
8.0.130.0000.00813.30
8.0.120.0040.00416.90
8.0.110.0000.00716.88
8.0.100.0050.00316.72
8.0.90.0040.00416.86
8.0.80.0040.01116.82
8.0.70.0080.00016.93
8.0.60.0030.00516.84
8.0.50.0050.00216.72
8.0.30.0100.01017.12
8.0.20.0100.00817.33
8.0.10.0000.00717.06
8.0.00.0070.01016.77
7.4.330.0050.00013.01
7.4.320.0030.00316.50
7.4.300.0030.00316.43
7.4.290.0070.00016.52
7.4.280.0030.00516.41
7.4.270.0030.00316.56
7.4.260.0070.00013.27
7.4.250.0040.00416.56
7.4.240.0000.00716.57
7.4.230.0030.00316.40
7.4.220.0120.00616.57
7.4.210.0080.00716.58
7.4.200.0030.00316.50
7.4.190.0070.00016.67
7.4.160.0210.00316.67
7.4.150.0070.01016.59
7.4.140.0090.00916.55
7.4.130.0180.02216.46
7.4.120.0110.00616.44
7.4.110.0090.01016.57
7.4.100.0090.01416.44
7.4.90.0090.00916.49
7.4.80.0030.01416.41
7.4.70.0130.00316.31
7.4.60.0040.01316.41
7.4.50.0030.00316.21
7.4.40.0070.00216.23
7.4.30.0100.00616.74
7.4.00.0060.00614.88
7.3.330.0000.00613.33
7.3.320.0060.00013.22
7.3.310.0080.00016.54
7.3.300.0030.00316.29
7.3.290.0040.01116.42
7.3.280.0100.00516.44
7.3.270.0120.00616.55
7.3.260.0100.00716.51
7.3.250.0150.00816.42
7.3.240.0120.00616.41
7.3.230.0170.00316.71
7.3.210.0030.01416.45
7.3.200.0120.00619.39
7.3.190.0080.00816.48
7.3.180.0160.00016.36
7.3.170.0060.01016.61
7.3.160.0090.00716.39
7.3.120.0070.00714.82
7.2.330.0170.00016.81
7.2.320.0130.00416.76
7.2.310.0090.01116.71
7.2.300.0100.01316.43
7.2.290.0070.01016.53
7.1.100.0000.01118.59
7.1.70.0000.01017.38
7.1.60.0030.01919.40
7.1.50.0090.01217.04
7.1.00.0070.07322.42
7.0.200.0040.00217.02
7.0.140.0030.07321.92
7.0.120.0000.07722.17
7.0.60.0070.06719.85
7.0.50.0130.04017.89
7.0.40.0130.07020.27
7.0.30.0300.07020.04
7.0.20.0170.04720.01
7.0.10.0200.04720.18
7.0.00.0070.03720.22
5.6.280.0100.06320.80
5.6.210.0030.09020.51
5.6.200.0070.05318.19
5.6.190.0070.04320.39
5.6.180.0230.07720.56
5.6.170.0230.05720.54
5.6.160.0130.08020.34
5.6.150.0100.07718.21
5.6.140.0070.04018.17
5.6.130.0000.06318.22
5.6.120.0170.05721.14
5.6.110.0000.07321.00
5.6.100.0100.08321.00
5.6.90.0030.04720.94
5.6.80.0000.04720.38
5.6.70.4200.04020.47
5.5.350.0300.06720.43
5.5.340.0100.04318.01
5.5.330.0070.04320.29
5.5.320.0430.05020.49
5.5.310.0200.04720.29
5.5.300.0070.08017.92
5.5.290.0070.06017.91
5.5.280.0100.04720.95
5.5.270.0030.04020.86
5.5.260.0130.08320.83
5.5.250.0170.06720.68
5.5.240.0070.07720.36
5.4.450.0470.04719.25
5.4.440.3230.04319.39
5.4.430.0130.05319.45
5.4.420.0070.06019.29
5.4.410.0230.06019.04
5.4.400.0170.07019.03
5.4.390.0030.08319.06
5.4.380.0170.06018.58
5.4.370.0100.04318.47
5.4.360.0070.03718.69
5.4.350.0100.03111.97
5.4.340.0080.04011.97
5.4.320.0020.04312.45
5.4.310.0070.04112.45
5.4.300.0060.03812.45
5.4.290.0060.03912.45
5.4.280.0060.03912.35
5.4.270.0070.03812.35
5.4.260.0050.04112.34
5.4.250.0080.03812.34
5.4.240.0080.03412.35
5.4.230.0070.04012.34
5.4.220.0080.03912.34
5.4.210.0080.03412.34
5.4.200.0060.03912.34
5.4.190.0070.04012.33
5.4.180.0080.03612.33
5.4.170.0070.04112.34
5.4.160.0070.03812.34
5.4.150.0090.03812.34
5.4.140.0070.03912.02
5.4.130.0070.03412.01
5.4.120.0060.03911.97
5.4.110.0070.04011.96
5.4.100.0070.03711.96
5.4.90.0070.04611.96
5.4.80.0090.04011.96
5.4.70.0060.04111.96
5.4.60.0090.03811.96
5.4.50.0080.04011.96
5.4.40.0080.04411.95
5.4.30.0070.04311.95
5.4.20.0060.04311.95
5.4.10.0070.04111.95
5.4.00.0060.03911.43
5.3.290.0040.04112.80
5.3.280.0060.04212.71
5.3.270.0070.04012.73
5.3.260.0060.04012.72
5.3.250.0050.04012.72
5.3.240.0060.04012.72
5.3.230.0080.04012.71
5.3.220.0070.04212.68
5.3.210.0040.04312.68
5.3.200.0070.04312.68
5.3.190.0090.04212.68
5.3.180.0060.04412.67
5.3.170.0080.03812.67
5.3.160.0070.04012.67
5.3.150.0070.04012.67
5.3.140.0070.03812.66
5.3.130.0060.04212.66
5.3.120.0070.03912.66
5.3.110.0070.03812.66
5.3.100.0060.04112.12
5.3.90.0050.04012.08
5.3.80.0060.03912.07
5.3.70.0070.03712.08
5.3.60.0080.03612.07
5.3.50.0060.04812.00
5.3.40.0070.04412.00

preferences:
39.29 ms | 401 KiB | 5 Q