3v4l.org

run code in 300+ PHP versions simultaneously
<?php print "omg"; $parts = parse_url("http://9999\n@1.2.3.4/btc.txt#lol"); print "meh"; print_r($parts); print "wah"; $hosts = gethostbynamel($parts['host']); print_r($hosts); #echo bin2hex($parts["user"]); print "wtf\n"; print buildUrl($parts); function buildUrl($parts) { $url = ''; $url .= (!empty($parts['scheme'])) ? $parts['scheme'] . '://' : ''; $url .= (!empty($parts['user'])) ? $parts['user'] : ''; $url .= (!empty($parts['pass'])) ? ':' . $parts['pass'] : ''; //If we have a user or pass, make sure to add an "@" $url .= (!empty($parts['user']) || !empty($parts['pass'])) ? '@' : ''; $url .= (!empty($parts['host'])) ? $parts['host'] : ''; $url .= (!empty($parts['port'])) ? ':' . $parts['port'] : ''; $url .= (!empty($parts['path'])) ? $parts['path'] : ''; $url .= (!empty($parts['query'])) ? '?' . $parts['query'] : ''; $url .= (!empty($parts['fragment'])) ? '#' . $parts['fragment'] : ''; return $url; } ?>

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.0120.00317.13
8.3.50.0210.00422.06
8.3.40.0120.00919.22
8.3.30.0140.00719.32
8.3.20.0070.00020.49
8.3.10.0040.00423.91
8.3.00.0040.00422.77
8.2.180.0030.01317.00
8.2.170.0120.00622.96
8.2.160.0100.00322.18
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00222.41
8.2.110.0000.00922.38
8.2.100.0090.00317.97
8.2.90.0000.00819.30
8.2.80.0000.00818.05
8.2.70.0040.00417.75
8.2.60.0000.00818.15
8.2.50.0060.00318.07
8.2.40.0000.00818.28
8.2.30.0000.00818.36
8.2.20.0050.00317.77
8.2.10.0040.00417.89
8.2.00.0030.00517.78
8.1.280.0110.00725.92
8.1.270.0090.00024.00
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00324.04
8.1.230.0080.00319.22
8.1.220.0000.00817.91
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0000.00817.66
8.1.180.0060.00318.10
8.1.170.0030.00618.48
8.1.160.0040.00422.08
8.1.150.0080.00018.80
8.1.140.0000.00717.62
8.1.130.0000.00817.93
8.1.120.0000.00717.60
8.1.110.0000.00717.62
8.1.100.0080.00017.53
8.1.90.0040.00717.46
8.1.80.0000.00717.54
8.1.70.0000.00717.48
8.1.60.0060.00317.68
8.1.50.0040.00517.63
8.1.40.0040.00417.70
8.1.30.0000.00817.66
8.1.20.0000.00817.81
8.1.10.0040.00417.72
8.1.00.0080.00017.59
8.0.300.0030.00618.77
8.0.290.0040.00417.30
8.0.280.0030.00318.64
8.0.270.0030.00317.35
8.0.260.0030.00316.98
8.0.250.0000.00717.07
8.0.240.0000.00717.09
8.0.230.0000.00717.08
8.0.220.0000.00717.04
8.0.210.0000.00716.92
8.0.200.0030.00316.89
8.0.190.0000.00817.13
8.0.180.0000.00716.98
8.0.170.0040.00417.01
8.0.160.0050.00317.04
8.0.150.0000.00717.00
8.0.140.0070.00016.94
8.0.130.0030.00313.58
8.0.120.0000.00817.07
8.0.110.0040.00417.01
8.0.100.0030.00617.15
8.0.90.0000.00716.95
8.0.80.0060.01216.96
8.0.70.0050.00316.92
8.0.60.0040.00416.84
8.0.50.0070.00016.99
8.0.30.0090.01017.47
8.0.20.0110.00817.40
8.0.10.0000.00817.11
8.0.00.0150.02016.99
7.4.330.0000.00515.21
7.4.320.0000.00716.75
7.4.300.0060.00016.79
7.4.290.0040.00416.71
7.4.280.0050.00316.66
7.4.270.0060.00316.65
7.4.260.0070.00016.66
7.4.250.0030.00316.62
7.4.240.0010.00716.67
7.4.230.0030.00316.40
7.4.220.0100.00616.78
7.4.210.0090.00716.75
7.4.200.0070.00016.85
7.4.190.0070.00016.64
7.4.160.0100.00716.66
7.4.150.0150.00417.40
7.4.140.0130.00717.86
7.4.130.0060.01316.61
7.4.120.0050.01316.54
7.4.110.0090.00916.96
7.4.100.0120.00616.49
7.4.90.0140.00316.67
7.4.80.0080.00819.39
7.4.70.0060.00916.74
7.4.60.0060.00916.75
7.4.50.0040.00416.45
7.4.40.0070.01122.77
7.4.30.0140.00916.48
7.4.00.0100.00814.92
7.3.330.0070.00013.58
7.3.320.0030.00313.32
7.3.310.0030.00316.41
7.3.300.0000.00716.32
7.3.290.0110.00716.42
7.3.280.0080.01116.38
7.3.270.0090.00917.40
7.3.260.0110.00716.52
7.3.250.0110.00916.47
7.3.240.0120.00616.42
7.3.230.0170.00016.42
7.3.210.0160.01016.59
7.3.200.0100.01719.39
7.3.190.0080.01416.44
7.3.180.0080.00816.58
7.3.170.0090.00616.59
7.3.160.0030.01316.63
7.3.120.0070.00814.91
7.3.110.0130.00314.61
7.3.100.0000.01214.64
7.3.90.0060.01214.83
7.3.80.0090.00314.72
7.3.70.0030.01414.88
7.3.60.0090.00914.96
7.3.50.0030.01014.93
7.3.40.0030.01014.91
7.3.30.0090.00914.86
7.3.20.0110.00416.65
7.3.10.0090.00916.95
7.3.00.0060.00616.33
7.2.330.0100.01016.68
7.2.320.0110.01117.02
7.2.310.0080.00917.02
7.2.300.0030.01316.87
7.2.290.0070.01016.91
7.2.250.0000.01515.10
7.2.240.0110.01115.34
7.2.230.0080.00815.01
7.2.220.0000.01415.45
7.2.210.0060.01315.08
7.2.200.0000.01415.15
7.2.190.0060.00914.98
7.2.180.0000.01115.19
7.2.170.0110.00715.20
7.2.60.0040.00717.04
7.2.00.0000.01419.15
7.1.330.0040.01115.75
7.1.320.0100.00315.93
7.1.310.0040.01615.86
7.1.300.0000.01316.00
7.1.290.0030.00615.88
7.1.280.0040.01615.95
7.1.270.0070.00716.06
7.1.260.0100.00315.72
7.1.200.0060.00616.02
7.1.100.0060.00618.10
7.1.70.0030.00616.79
7.1.60.0140.01119.29
7.1.50.0250.01716.89
7.1.00.0130.06722.38
7.0.200.0090.00616.55
7.0.140.0070.07022.00
7.0.60.0030.04319.85
7.0.50.0070.07317.96
7.0.40.0130.03720.18
7.0.30.0470.05020.20
7.0.20.0300.04020.29
7.0.10.0200.06720.16
7.0.00.0030.04320.14
5.6.280.0130.06320.94
5.6.210.0070.06020.82
5.6.200.0070.08718.25
5.6.190.0100.06020.54
5.6.180.0100.08020.84
5.6.170.0170.05020.58
5.6.160.0030.07020.57
5.6.150.0100.07018.22
5.6.140.0030.08018.25
5.6.130.0070.04318.31
5.6.120.0170.05021.20
5.6.110.0030.06321.20
5.6.100.0030.08321.04
5.6.90.0030.09020.94
5.6.80.0100.08020.41
5.6.70.0370.07020.38
5.5.350.0070.07720.37
5.5.340.0130.06718.05
5.5.330.0100.08020.36
5.5.320.0000.09020.38
5.5.310.0200.04320.41
5.5.300.0030.08018.05
5.5.290.0130.07718.14
5.5.280.0070.04020.89
5.5.270.0100.05320.94
5.5.260.0070.07321.03
5.5.250.0130.07320.83
5.5.240.0070.06320.27
5.4.450.3870.03719.71
5.4.440.3600.04319.63
5.4.430.3830.03319.43
5.4.420.4000.04019.43
5.4.410.3700.04019.48
5.4.400.3300.03019.31
5.4.390.2770.03319.00
5.4.380.3000.03719.03
5.4.370.3030.03319.22
5.4.360.3300.03719.17
5.4.350.3730.04019.11
5.4.340.3900.03719.00
5.4.320.3470.03719.22
5.4.310.3630.03319.23
5.4.300.3730.03719.29
5.4.290.2970.03719.00
5.4.280.3770.03719.20
5.4.270.3970.04319.14
5.4.260.3870.03019.31
5.4.250.3730.04019.12
5.4.240.1970.05019.25
5.4.230.3130.03719.14
5.4.220.3600.03319.38
5.4.210.3470.03719.00
5.4.200.3870.03319.30
5.4.190.3730.03718.96
5.4.180.3870.03319.00
5.4.170.2730.04319.14
5.4.160.3930.04019.36
5.4.150.4630.03019.24
5.4.140.4130.04016.48
5.4.130.4170.04316.63
5.4.120.3570.03716.61
5.4.110.3530.03716.36
5.4.100.2930.03716.67
5.4.90.3500.03716.44
5.4.80.3730.03316.66
5.4.70.3400.04016.56
5.4.60.3470.03316.46
5.4.50.3430.03316.59
5.4.40.3970.03016.29
5.4.30.3670.03716.29
5.4.20.3530.04016.62
5.4.10.3730.04016.37
5.4.00.3730.03016.18
5.3.290.3770.04014.65
5.3.280.4670.02714.51
5.3.270.4100.04014.59
5.3.260.3900.03714.52
5.3.250.3900.04314.72
5.3.240.3830.04014.63
5.3.230.4600.04014.54
5.3.220.3570.03314.55
5.3.210.4230.05014.60
5.3.200.3330.04014.60
5.3.190.4570.04014.57
5.3.180.4030.03314.73
5.3.170.3770.03314.48
5.3.160.4570.03314.49
5.3.150.4000.03714.49
5.3.140.4130.04714.58
5.3.130.3800.04014.79
5.3.120.3530.04014.47
5.3.110.3800.04714.57
5.3.100.3730.03314.03
5.3.90.3170.03714.04
5.3.80.3800.04014.00
5.3.70.3500.04014.02
5.3.60.3770.03714.09
5.3.50.3970.03014.05
5.3.40.3970.04313.96
5.3.30.3830.02314.01
5.3.20.3430.03713.76
5.3.10.3870.04013.57
5.3.00.3670.03313.75
5.2.170.4030.01311.09
5.2.160.3270.03011.28
5.2.150.2930.03711.08
5.2.140.3300.03011.23
5.2.130.3130.03011.07
5.2.120.3130.03311.03
5.2.110.3230.03011.02
5.2.100.3170.02711.04
5.2.90.3130.03011.04
5.2.80.3470.03711.27
5.2.70.3630.03011.27
5.2.60.3530.02711.14
5.2.50.3500.02010.96
5.2.40.3100.02711.00
5.2.30.3070.03010.91
5.2.20.3270.02010.87
5.2.10.2630.02710.95
5.2.00.2330.02310.66
5.1.60.2270.02710.06
5.1.50.2970.02710.06
5.1.40.2730.02710.14
5.1.30.2670.02310.40
5.1.20.2930.02010.34
5.1.10.2330.03010.06
5.1.00.2430.02310.06
5.0.50.1230.01310.06
5.0.40.1200.01710.06
5.0.30.1170.03010.06
5.0.20.1130.02010.06
5.0.10.1230.02310.06
5.0.00.1270.03010.06
4.4.90.1670.02010.06
4.4.80.1370.01710.06
4.4.70.1400.01310.06
4.4.60.1570.02010.06
4.4.50.1370.01010.06
4.4.40.1570.02710.06
4.4.30.1200.01710.06
4.4.20.1400.00710.06
4.4.10.1200.01310.06
4.4.00.1170.02310.06
4.3.110.1170.01310.06
4.3.100.1200.01310.06
4.3.90.1130.01710.06
4.3.80.1230.01710.06
4.3.70.1170.01310.06
4.3.60.1200.01010.06
4.3.50.0870.01710.06
4.3.40.1170.02010.06
4.3.30.0570.01710.06
4.3.20.0570.01710.06
4.3.10.0600.01310.06
4.3.00.0630.01010.06

preferences:
44.47 ms | 401 KiB | 5 Q