3v4l.org

run code in 300+ PHP versions simultaneously
<?php $answer['message'] = "this is a test message. next is emptyline and here are to empty lines end."; print(preg_replace("/^$/ui", "", str_replace(["\n\r", "\n\n", "\r\r","\r\n"], "\n", $answer['message'])));

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.00716.63
8.3.50.0110.00822.88
8.3.40.0060.01218.96
8.3.30.0090.00619.21
8.3.20.0040.00420.29
8.3.10.0000.00923.64
8.3.00.0030.00519.63
8.2.180.0060.00918.31
8.2.170.0150.00322.96
8.2.160.0100.00720.56
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0000.01019.27
8.2.100.0040.00718.09
8.2.90.0000.00819.40
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00717.91
8.2.30.0000.00718.06
8.2.20.0060.00317.90
8.2.10.0080.00018.06
8.2.00.0080.00017.95
8.1.280.0000.01425.92
8.1.270.0000.00822.11
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.96
8.1.230.0110.00020.91
8.1.220.0060.00318.77
8.1.210.0040.00419.02
8.1.200.0060.00317.48
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0130.00018.38
8.1.160.0040.00421.96
8.1.150.0070.00018.78
8.1.140.0000.00717.40
8.1.130.0000.00717.76
8.1.120.0070.00017.34
8.1.110.0030.00617.45
8.1.100.0030.00317.46
8.1.90.0070.00017.34
8.1.80.0070.00017.47
8.1.70.0030.00317.45
8.1.60.0000.00817.51
8.1.50.0040.00417.45
8.1.40.0040.00417.58
8.1.30.0000.00817.71
8.1.20.0000.00717.68
8.1.10.0000.00717.68
8.1.00.0000.00817.60
8.0.300.0080.00019.91
8.0.290.0060.00316.75
8.0.280.0030.00318.39
8.0.270.0030.00317.16
8.0.260.0000.00817.10
8.0.250.0080.00016.99
8.0.240.0030.00317.06
8.0.230.0000.00716.88
8.0.220.0060.00017.05
8.0.210.0000.00716.98
8.0.200.0040.00417.06
8.0.190.0070.00016.94
8.0.180.0060.00316.99
8.0.170.0050.00316.91
8.0.160.0050.00216.96
8.0.150.0070.00016.75
8.0.140.0030.00316.96
8.0.130.0000.00713.37
8.0.120.0090.00016.82
8.0.110.0000.00716.89
8.0.100.0050.00316.81
8.0.90.0000.00716.76
8.0.80.0080.00816.99
8.0.70.0000.00717.00
8.0.60.0000.00717.03
8.0.50.0040.00416.86
8.0.30.0100.01017.34
8.0.20.0100.01017.41
8.0.10.0030.00516.90
8.0.00.0060.01416.95
7.4.330.0000.00615.11
7.4.320.0030.00316.66
7.4.300.0030.00316.72
7.4.290.0040.00416.65
7.4.280.0000.00716.66
7.4.270.0000.00716.59
7.4.260.0060.00316.65
7.4.250.0040.00416.60
7.4.240.0000.00716.65
7.4.230.0040.00416.57
7.4.220.0120.00616.63
7.4.210.0060.01616.70
7.4.200.0070.00016.62
7.4.160.0090.00916.68
7.4.150.0070.01317.40
7.4.140.0080.01217.86
7.4.130.0070.01016.73
7.4.120.0090.00816.70
7.4.110.0060.01016.66
7.4.100.0070.01116.92
7.4.90.0090.00916.82
7.4.80.0080.01219.39
7.4.70.0100.00716.69
7.4.60.0130.00316.73
7.4.50.0030.00616.41
7.4.40.0090.00616.76
7.4.30.0040.01416.76
7.4.00.0070.01015.01
7.3.330.0030.00313.11
7.3.320.0020.00213.34
7.3.310.0030.00316.41
7.3.300.0050.00316.44
7.3.290.0090.00616.50
7.3.280.0060.01116.48
7.3.270.0070.01017.40
7.3.260.0100.01416.58
7.3.250.0100.00716.55
7.3.240.0100.01316.41
7.3.230.0080.00816.66
7.3.210.0070.01016.75
7.3.200.0130.00319.39
7.3.190.0100.00716.93
7.3.180.0030.01216.71
7.3.170.0090.00616.78
7.3.160.0070.01116.24
7.3.120.0080.00814.98
7.3.110.0050.01314.83
7.3.100.0080.00815.09
7.3.90.0050.01015.13
7.3.80.0060.00714.82
7.3.70.0100.00515.07
7.3.60.0070.00614.83
7.3.50.0090.00414.90
7.3.40.0060.00714.80
7.3.30.0080.00614.98
7.3.20.0100.00616.84
7.3.10.0080.00516.88
7.3.00.0020.01016.97
7.2.330.0090.00916.64
7.2.320.0100.00716.78
7.2.310.0070.01016.72
7.2.300.0080.01116.68
7.2.290.0060.01016.84
7.2.250.0070.01115.17
7.2.240.0050.01315.15
7.2.230.0080.00815.25
7.2.220.0020.01215.19
7.2.210.0050.01115.14
7.2.200.0120.00215.21
7.2.190.0080.00514.99
7.2.180.0100.00615.34
7.2.170.0080.00315.28
7.2.160.0040.01115.10
7.2.150.0000.01016.91
7.2.140.0110.00717.16
7.2.130.0070.00416.97
7.2.120.0070.00716.83
7.2.110.0110.00017.11
7.2.100.0030.00917.16
7.2.90.0120.00617.22
7.2.80.0040.01216.93
7.2.70.0000.01417.09
7.2.60.0070.00717.00
7.2.50.0060.00317.14
7.2.40.0100.00616.78
7.2.30.0070.00717.04
7.2.20.0090.00417.15
7.2.10.0000.01117.19
7.2.00.0100.01016.95
7.1.330.0070.00715.92
7.1.320.0060.01115.73
7.1.310.0060.01016.08
7.1.300.0040.00915.78
7.1.290.0050.00815.99
7.1.280.0070.00715.82
7.1.270.0040.01115.84
7.1.260.0080.00715.92
7.1.250.0030.01016.05
7.1.240.0040.00415.99
7.1.230.0030.01016.00
7.1.220.0070.00515.82
7.1.210.0050.00515.76
7.1.200.0060.00615.75
7.1.190.0090.00616.05
7.1.180.0080.00415.79
7.1.170.0030.00916.05
7.1.160.0090.00315.77
7.1.150.0030.00715.87
7.1.140.0060.00315.93
7.1.130.0070.00716.06
7.1.120.0100.00715.74
7.1.110.0070.01115.89
7.1.100.0080.00415.88
7.1.90.0060.00915.84
7.1.80.0100.00715.94
7.1.70.0050.01116.59
7.1.60.0050.01217.61
7.1.50.0030.00816.45
7.1.40.0060.00616.03
7.1.30.0040.01215.99
7.1.20.0030.00815.96
7.1.10.0030.01115.96
7.1.00.0030.04319.22
7.0.330.0030.00715.62
7.0.320.0030.00615.62
7.0.310.0120.00315.33
7.0.300.0000.01315.45
7.0.290.0080.00015.43
7.0.280.0090.00315.73
7.0.270.0030.01615.65
7.0.260.0070.00715.84
7.0.250.0040.00715.47
7.0.240.0090.00315.71
7.0.230.0060.00715.57
7.0.220.0110.00715.74
7.0.210.0060.00915.39
7.0.200.0210.00715.02
7.0.190.0090.00315.61
7.0.180.0070.00715.48
7.0.170.0000.01115.58
7.0.160.0040.00715.74
7.0.150.0080.00415.77
7.0.140.0030.03918.78
7.0.130.0070.01015.56
7.0.120.0090.00615.76
7.0.110.0160.03217.94
7.0.100.0120.04217.87
7.0.90.0080.04517.76
7.0.80.0120.03817.89
7.0.70.0070.04217.66
7.0.60.0150.04017.88
7.0.50.0060.04118.13
7.0.40.0090.04016.94
7.0.30.0070.04616.80
7.0.20.0030.04916.93
7.0.10.0070.04516.89
7.0.00.0110.03816.94
5.6.400.0030.00914.16
5.6.390.0050.00514.59
5.6.380.0000.00914.58
5.6.370.0070.01014.59
5.6.360.0040.00814.77
5.6.350.0070.00314.25
5.6.340.0110.00314.20
5.6.330.0060.00914.30
5.6.320.0030.00614.20
5.6.310.0090.00914.29
5.6.300.0070.01114.63
5.6.290.0070.01014.48
5.6.280.0030.04317.79
5.6.270.0110.00414.59
5.6.260.0080.04317.55
5.6.250.0160.03817.59
5.6.240.0100.04417.46
5.6.230.0070.04217.52
5.6.220.0070.04117.62
5.6.210.0030.04917.55
5.6.200.0070.04017.73
5.6.190.0120.03817.77
5.6.180.0070.04517.70
5.6.170.0050.04517.77
5.6.160.0120.03717.74
5.6.150.0100.03617.63
5.6.140.0050.04717.78
5.6.130.0080.04717.72
5.6.120.0150.04017.70
5.6.110.0050.02417.70
5.6.100.0100.04317.71
5.6.90.0050.02817.80
5.6.80.0080.04217.46
5.6.70.0100.04317.44
5.6.60.0100.02017.42
5.6.50.0100.03817.36
5.6.40.0030.04417.24
5.6.30.0070.04317.39
5.6.20.0050.04117.28
5.6.10.0050.04817.42
5.6.00.0100.03517.29
5.5.380.0070.04617.54
5.5.370.0090.03617.44
5.5.360.0080.04517.40
5.5.350.0070.04417.42
5.5.340.0070.04417.81
5.5.330.0070.02817.67
5.5.320.0050.02817.74
5.5.310.0140.03517.74
5.5.300.0080.04217.68
5.5.290.0080.04017.48
5.5.280.0160.03817.87
5.5.270.0090.02717.48
5.5.260.0070.02817.66
5.5.250.0100.04317.28
5.5.240.0090.04117.31
5.5.230.0060.04317.35
5.5.220.0080.02217.32
5.5.210.0020.02917.14
5.5.200.0050.03217.10
5.5.190.0150.03717.16
5.5.180.0060.04117.12
5.5.170.0030.01214.28
5.5.160.0110.04017.30
5.5.150.0050.04317.27
5.5.140.0070.03917.21
5.5.130.0070.04017.35
5.5.120.0120.03817.28
5.5.110.0080.04217.25
5.5.100.0110.04117.11
5.5.90.0090.04217.23
5.5.80.0030.04416.99
5.5.70.0150.03517.07
5.5.60.0030.04417.20
5.5.50.0030.04617.06
5.5.40.0050.03917.20
5.5.30.0020.02317.31
5.5.20.0090.03917.21
5.5.10.0120.03717.23
5.5.00.0040.04617.18
5.4.450.0050.04115.91
5.4.440.0050.03615.82
5.4.430.0020.02815.91
5.4.420.0070.03515.93
5.4.410.0070.02315.76
5.4.400.0040.04315.70
5.4.390.0040.04015.69
5.4.380.0050.03815.81
5.4.370.0080.04015.66
5.4.360.0080.03815.68
5.4.350.0020.03115.82
5.4.340.0080.02415.66
5.4.330.0030.01012.37
5.4.320.0080.04015.70
5.4.310.0120.03815.81
5.4.300.0040.03915.80
5.4.290.0030.04515.82
5.4.280.0080.04015.67
5.4.270.0100.02015.77
5.4.260.0070.04115.78
5.4.250.0030.02515.65
5.4.240.0050.03515.73
5.4.230.0030.04215.82
5.4.220.0020.04615.68
5.4.210.0110.03815.67
5.4.200.0080.03715.68
5.4.190.0150.03715.70
5.4.180.0100.01515.69
5.4.170.0070.02515.74
5.4.160.0030.04515.67
5.4.150.0070.04215.67
5.4.140.0110.03314.40
5.4.130.0080.03614.31
5.4.120.0040.02714.41
5.4.110.0030.02114.44
5.4.100.0000.02314.39
5.4.90.0020.02314.33
5.4.80.0030.02314.42
5.4.70.0030.02114.36
5.4.60.0050.02014.46
5.4.50.0050.01814.36
5.4.40.0030.02314.38
5.4.30.0020.02114.44
5.4.20.0030.02514.41
5.4.10.0070.03214.34
5.4.00.0030.02014.14
5.3.290.0000.08314.50
5.3.280.0030.08014.46
5.3.270.0170.07014.44
5.3.260.0000.08314.53
5.3.250.0030.08014.43
5.3.240.0070.07714.49
5.3.230.0030.07714.42
5.3.220.0000.04014.64
5.3.210.0070.03714.41
5.3.200.0170.03014.45
5.3.190.0030.05314.67
5.3.180.0000.04314.59
5.3.170.0130.04314.35
5.3.160.0070.03314.46
5.3.150.0030.03714.66
5.3.140.0000.04314.57
5.3.130.0000.04014.34
5.3.120.0070.03714.39
5.3.110.0030.05714.41
5.3.100.0000.04013.95
5.3.90.0100.06013.97
5.3.80.0030.07013.90
5.3.70.0070.07714.08
5.3.60.0100.05013.93
5.3.50.0030.07014.04
5.3.40.0030.03313.87
5.3.30.0030.03713.79
5.3.20.0030.04013.48
5.3.10.0000.03713.75
5.3.00.0030.03313.56
5.2.170.0000.02711.75
5.2.160.0000.04311.75
5.2.150.0030.02311.75
5.2.140.0030.02311.75
5.2.130.0030.02011.75
5.2.120.0100.02011.75
5.2.110.0030.02311.75
5.2.100.0000.03711.75
5.2.90.0000.02711.75
5.2.80.0000.04311.75
5.2.70.0000.03011.75
5.2.60.0000.02711.75
5.2.50.0000.04011.75
5.2.40.0030.03011.75
5.2.30.0000.03311.75
5.2.20.0030.02711.75
5.2.10.0000.04711.75
5.2.00.0030.06311.75
5.1.60.0030.04311.75
5.1.50.0030.02011.75
5.1.40.0000.04011.75
5.1.30.0030.02711.75
5.1.20.0030.04011.75
5.1.10.0030.02311.75
5.1.00.0100.03311.75
5.0.50.0030.02011.75
5.0.40.0030.02711.75
5.0.30.0030.02311.75
5.0.20.0030.01711.75
5.0.10.0000.04311.75
5.0.00.0000.04311.75
4.4.90.0000.01711.75
4.4.80.0000.03311.75
4.4.70.0000.01311.75
4.4.60.0000.01311.75
4.4.50.0000.01711.75
4.4.40.0000.02311.75
4.4.30.0030.01311.75
4.4.20.0000.01711.75
4.4.10.0030.01311.75
4.4.00.0000.02311.75
4.3.110.0000.01711.75
4.3.100.0030.01011.75
4.3.90.0000.01311.75
4.3.80.0000.03311.75
4.3.70.0030.02311.75
4.3.60.0030.01311.75
4.3.50.0000.03011.75
4.3.40.0030.03311.75
4.3.30.0000.02011.75
4.3.20.0030.01311.75
4.3.10.0000.01711.75
4.3.00.0000.02711.75

preferences:
50.46 ms | 401 KiB | 5 Q