3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "this is the link: https://stackoverflow.com/questions/ask"; $linktext = preg_replace_callback("/([\w]+\:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/", function ($m) { $url = $m[0]; $parts = parse_url($url); $parts["host"] = str_replace("www.", "", $parts["host"]); array_shift($parts); $shortURL = implode("", $parts); $shortenedURL = substr($shortURL, 0, 20); if (strlen($shortURL) > 20) $shortenedURL .= "..."; return "<a href=\"".$url."\">".$shortenedURL."</a>"; var_dump($parts); }, $url); echo $linktext;

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.5.00.0140.00820.19
8.4.150.0010.00214.05
8.4.140.0100.01117.86
8.4.130.0160.00517.89
8.4.120.0110.00920.56
8.4.110.0120.00518.75
8.4.100.0060.00317.99
8.4.90.0100.01017.98
8.4.80.0100.00219.65
8.4.70.0090.00718.18
8.4.60.0050.00518.78
8.4.50.0120.00819.74
8.4.40.0040.00417.87
8.4.30.0040.00417.71
8.4.20.0040.00717.99
8.4.10.0040.00419.65
8.3.280.0140.00618.63
8.3.270.0140.00516.64
8.3.260.0050.00416.63
8.3.250.0150.00518.86
8.3.240.0120.00816.68
8.3.230.0110.00816.81
8.3.220.0100.00818.85
8.3.210.0120.00616.58
8.3.200.0070.00216.82
8.3.190.0110.00817.02
8.3.180.0100.00619.17
8.3.170.0130.00018.93
8.3.160.0150.00316.71
8.3.150.0150.00017.01
8.3.140.0000.00818.63
8.3.130.0180.00018.39
8.3.120.0060.00319.03
8.3.110.0120.00416.71
8.3.100.0130.00316.88
8.3.90.0090.00916.75
8.3.80.0030.00718.30
8.3.70.0070.01818.25
8.3.60.0090.00918.56
8.3.50.0160.00517.40
8.3.40.0180.00418.64
8.3.30.0060.00918.90
8.3.20.0040.00420.18
8.3.10.0080.00022.08
8.3.00.0080.00023.61
8.2.290.0100.00919.03
8.2.280.0070.00318.16
8.2.270.0150.00316.82
8.2.260.0040.00418.88
8.2.250.0060.00318.45
8.2.240.0000.00917.07
8.2.230.0000.00820.94
8.2.220.0090.00024.06
8.2.210.0070.00726.77
8.2.200.0120.00016.50
8.2.190.0120.00316.58
8.2.180.0090.00916.75
8.2.170.0210.00022.96
8.2.160.0070.01022.08
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00220.52
8.2.120.0000.01326.35
8.2.110.0080.00320.90
8.2.100.0080.00417.84
8.2.90.0040.00417.85
8.2.80.0080.00017.97
8.2.70.0030.00617.92
8.2.60.0080.00018.22
8.2.50.0060.00318.10
8.2.40.0080.00319.18
8.2.30.0000.00819.16
8.2.20.0080.00018.09
8.2.10.0000.00818.05
8.2.00.0030.00517.97
8.1.330.0100.01016.57
8.1.320.0080.01016.25
8.1.310.0110.00716.70
8.1.300.0030.00517.70
8.1.290.0090.00018.88
8.1.280.0100.00725.92
8.1.270.0000.00920.24
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00722.21
8.1.230.0080.00422.75
8.1.220.0000.00817.74
8.1.210.0060.00320.18
8.1.200.0000.00917.35
8.1.190.0000.00817.10
8.1.180.0030.00518.10
8.1.170.0050.00318.59
8.1.160.0000.00719.05
8.1.150.0040.00418.80
8.1.140.0000.00817.64
8.1.130.0070.00018.96
8.1.120.0070.00317.46
8.1.110.0030.00617.38
8.1.100.0040.00417.46
8.1.90.0070.00317.55
8.1.80.0040.00417.51
8.1.70.0070.00017.38
8.1.60.0030.00617.64
8.1.50.0040.00417.59
8.1.40.0090.00017.55
8.1.30.0040.00417.76
8.1.20.0040.00417.66
8.1.10.0040.00417.40
8.1.00.0060.00317.50
8.0.300.0050.00321.83
8.0.290.0000.00816.88
8.0.280.0040.00418.46
8.0.270.0000.00717.37
8.0.260.0060.00318.41
8.0.250.0000.00817.12
8.0.240.0050.00317.04
8.0.230.0000.00716.96
8.0.220.0050.00316.89
8.0.210.0030.00316.95
8.0.200.0000.00816.98
8.0.190.0090.00017.06
8.0.180.0000.00816.98
8.0.170.0080.00016.98
8.0.160.0040.00416.95
8.0.150.0080.00016.88
8.0.140.0070.00016.86
8.0.130.0030.00313.45
8.0.120.0050.00216.96
8.0.110.0090.00016.82
8.0.100.0050.00217.10
8.0.90.0000.00816.79
8.0.80.0070.00817.04
8.0.70.0040.00416.81
8.0.60.0040.00416.94
8.0.50.0030.00516.83
8.0.30.0050.01117.09
8.0.20.0110.00817.40
8.0.10.0070.00017.03
8.0.00.0100.00716.91
7.4.330.0040.00015.55
7.4.320.0070.00016.70
7.4.300.0060.00016.68
7.4.290.0030.00816.59
7.4.280.0040.00416.68
7.4.270.0000.00716.68
7.4.260.0070.00016.65
7.4.250.0050.00216.67
7.4.240.0000.00716.66
7.4.230.0030.00316.63
7.4.220.0000.01916.59
7.4.210.0120.00316.61
7.4.200.0000.00716.54
7.4.160.0030.01416.60
7.4.150.0120.01217.40
7.4.140.0120.00717.86
7.4.130.0150.00916.45
7.4.120.0110.01016.55
7.4.110.0120.00616.50
7.4.100.0080.00816.78
7.4.90.0060.01116.54
7.4.80.0180.00319.39
7.4.70.0150.00716.51
7.4.60.0070.01016.50
7.4.50.0070.01016.39
7.4.40.0070.01316.64
7.4.30.0030.01316.71
7.4.00.0100.00714.95
7.3.330.0000.00613.41
7.3.320.0000.00613.40
7.3.310.0030.00316.48
7.3.300.0030.00316.32
7.3.290.0060.00916.44
7.3.280.0070.00916.46
7.3.270.0110.00517.40
7.3.260.0120.01116.56
7.3.250.0080.01116.41
7.3.240.0090.01016.57
7.3.230.0100.00716.44
7.3.210.0000.01616.32
7.3.200.0100.00716.41
7.3.190.0160.00016.77
7.3.180.0130.00916.48
7.3.170.0090.00616.50
7.3.160.0060.01716.55
7.3.120.0120.00614.92
7.3.110.0090.00614.75
7.3.100.0060.00615.14
7.3.90.0040.01114.88
7.3.80.0070.00715.11
7.3.70.0080.00415.04
7.3.60.0030.00714.92
7.3.50.0030.01114.75
7.3.40.0080.00414.70
7.3.30.0100.00314.98
7.3.20.0060.00616.77
7.3.10.0060.00616.59
7.3.00.0080.00416.87
7.2.330.0040.01416.82
7.2.320.0060.01616.84
7.2.310.0070.01416.98
7.2.300.0060.01016.68
7.2.290.0150.00416.84
7.2.250.0060.01315.27
7.2.240.0070.01015.29
7.2.230.0110.00415.33
7.2.220.0060.00915.22
7.2.210.0060.00915.39
7.2.200.0080.00415.38
7.2.190.0100.00315.20
7.2.180.0100.00615.22
7.2.170.0110.00415.22
7.2.60.0080.00017.13
7.2.50.0030.00917.21
7.1.330.0100.00616.00
7.1.320.0000.00916.12
7.1.310.0090.00016.10
7.1.300.0000.01116.11
7.1.290.0040.00815.83
7.1.280.0030.00615.95
7.1.270.0030.01016.11
7.1.260.0000.00916.11
7.1.200.0000.01216.00
7.1.100.7400.01016.52
7.1.90.8880.00716.50
7.1.80.4970.01016.63
7.1.70.5810.01015.50
7.1.60.3690.00333.55
7.1.50.5460.01733.13
7.1.40.2980.01732.95
7.1.30.3790.01832.89
7.1.20.3180.00533.07
7.1.10.2800.01314.89
7.1.00.4930.01015.29
7.0.240.6900.01016.03
7.0.230.8020.01016.07
7.0.220.5400.00015.88
7.0.210.4020.01615.10
7.0.200.8160.00914.96
7.0.190.7610.00715.31
7.0.180.3710.00714.57
7.0.170.7680.02014.87
7.0.160.4140.01314.63
7.0.150.3610.00714.79
7.0.140.3310.01314.77
7.0.130.4480.01314.84
7.0.120.5240.01315.03
7.0.110.5560.00715.02
7.0.100.3930.01014.68
7.0.90.4830.01014.96
7.0.80.4970.01214.88
7.0.70.4700.02014.66
7.0.60.4360.01314.66
7.0.50.5190.00314.96
7.0.40.3220.00715.15
7.0.30.2960.00314.80
7.0.20.4440.01014.80
7.0.10.3480.01314.82
7.0.00.2960.00714.75

preferences:
29.73 ms | 403 KiB | 5 Q