3v4l.org

run code in 300+ PHP versions simultaneously
<?php print "omg"; $parts = parse_url("http://9999?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.0070.00716.75
8.3.50.0140.00318.17
8.3.40.0090.00618.90
8.3.30.0110.00319.41
8.3.20.0070.00020.59
8.3.10.0000.00823.79
8.3.00.0000.00720.87
8.2.180.0060.00916.63
8.2.170.0080.00622.96
8.2.160.0100.00322.24
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00622.39
8.2.110.0050.00522.36
8.2.100.0060.00617.84
8.2.90.0040.00419.39
8.2.80.0090.00018.16
8.2.70.0030.00617.75
8.2.60.0000.00818.05
8.2.50.0080.00018.07
8.2.40.0040.00419.34
8.2.30.0040.00418.42
8.2.20.0000.00717.80
8.2.10.0030.00519.67
8.2.00.0050.00317.91
8.1.280.0090.00625.92
8.1.270.0060.00324.04
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0070.00423.91
8.1.230.0160.00019.19
8.1.220.0000.00817.88
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.55
8.1.180.0080.00018.10
8.1.170.0060.00318.69
8.1.160.0050.00522.09
8.1.150.0040.00418.86
8.1.140.0040.00417.55
8.1.130.0040.00419.48
8.1.120.0030.00317.59
8.1.110.0000.00817.53
8.1.100.0040.00417.53
8.1.90.0040.00417.59
8.1.80.0040.00417.57
8.1.70.0030.00317.48
8.1.60.0030.00617.73
8.1.50.0000.00817.62
8.1.40.0080.00017.58
8.1.30.0040.00417.73
8.1.20.0040.00417.73
8.1.10.0060.00317.73
8.1.00.0090.00017.66
8.0.300.0040.00418.77
8.0.290.0000.00717.29
8.0.280.0070.00018.56
8.0.270.0050.00217.31
8.0.260.0040.00418.63
8.0.250.0000.00716.93
8.0.240.0050.00317.11
8.0.230.0030.00317.11
8.0.220.0030.00317.09
8.0.210.0000.00716.97
8.0.200.0030.00317.09
8.0.190.0040.00417.02
8.0.180.0040.00416.97
8.0.170.0030.00617.12
8.0.160.0080.00016.99
8.0.150.0040.00417.03
8.0.140.0040.00417.01
8.0.130.0030.00313.49
8.0.120.0080.00016.97
8.0.110.0050.00217.09
8.0.100.0000.00817.12
8.0.90.0040.00416.82
8.0.80.0040.01117.03
8.0.70.0040.00417.11
8.0.60.0000.00816.80
8.0.50.0080.00016.78
8.0.30.0090.01217.03
8.0.20.0120.00717.47
8.0.10.0070.00017.23
8.0.00.0120.00816.86
7.4.330.0030.00315.34
7.4.320.0000.00616.60
7.4.300.0030.00316.65
7.4.290.0030.00316.64
7.4.280.0040.00416.60
7.4.270.0000.00716.51
7.4.260.0030.00316.55
7.4.250.0040.00416.52
7.4.240.0040.00416.69
7.4.230.0050.00216.58
7.4.220.0100.01716.56
7.4.210.0060.01116.66
7.4.200.0070.00016.86
7.4.190.0000.00816.92
7.4.160.0040.01216.69
7.4.150.0060.01217.40
7.4.140.0070.01017.86
7.4.130.0080.01016.78
7.4.120.0070.01316.52
7.4.110.0090.01016.61
7.4.100.0070.01016.88
7.4.90.0090.00616.54
7.4.80.0130.00716.61
7.4.70.0040.01216.68
7.4.60.0080.00816.61
7.4.50.0080.00016.42
7.4.40.0080.00322.77
7.4.30.0100.00616.74
7.4.00.0070.01015.13
7.3.330.0030.00313.38
7.3.320.0030.00313.41
7.3.310.0000.00716.50
7.3.300.0000.00716.50
7.3.290.0150.00016.43
7.3.280.0090.01216.40
7.3.270.0100.00717.40
7.3.260.0150.00316.68
7.3.250.0120.00816.65
7.3.240.0150.00616.51
7.3.230.0110.01116.69
7.3.210.0110.00916.53
7.3.200.0110.00619.39
7.3.190.0080.00816.54
7.3.180.0080.00816.50
7.3.170.0060.00916.64
7.3.160.0060.01016.34
7.3.120.0000.01714.74
7.2.330.0030.01516.58
7.2.320.0090.01216.58
7.2.310.0060.01216.96
7.2.300.0120.00916.44
7.2.290.0140.00316.50
7.2.60.0070.00017.00
7.2.00.0040.00819.53
7.1.200.0060.00616.01
7.1.100.0090.00918.19
7.1.70.0030.00616.90
7.1.60.0160.01019.29
7.1.50.0130.01017.21
7.1.00.0000.08022.34
7.0.200.0060.00616.85
7.0.140.0070.06722.04
7.0.110.0070.06020.23
7.0.100.0130.07320.46
7.0.90.0130.07720.18
7.0.80.0130.08020.16
7.0.70.0100.04720.25
7.0.60.0070.05019.99
7.0.50.0100.08320.63
7.0.40.0070.07320.70
7.0.30.0030.06020.39
7.0.20.0100.08320.62
7.0.10.0070.08320.36
7.0.00.0100.05020.68
5.6.280.0130.06320.94
5.6.260.0200.07021.12
5.6.250.0100.08320.99
5.6.240.0100.07720.90
5.6.230.0170.07020.98
5.6.220.0100.06720.89
5.6.210.0100.07720.85
5.6.200.0100.07721.52
5.6.190.0070.08321.71
5.6.180.0130.06721.48
5.6.170.0070.07721.29
5.6.160.0070.08021.43
5.6.150.0070.07321.50
5.6.140.0070.08021.34
5.6.130.0200.04321.50
5.6.120.0130.04721.33
5.6.110.0200.07721.41
5.6.100.0030.09021.31
5.6.90.0030.08721.30
5.6.80.0100.07320.80
5.6.70.0170.04720.68
5.6.60.0030.08320.80
5.6.50.0070.07720.78
5.6.40.0130.08020.77
5.6.30.0030.07720.79
5.6.20.0070.04720.79
5.6.10.0100.08320.73
5.6.00.0230.06320.77
5.5.380.0130.05020.84
5.5.370.0100.08320.59
5.5.360.0070.07720.69
5.5.350.0130.07320.72
5.5.340.0100.07721.20
5.5.330.0030.08321.17
5.5.320.0100.08321.46
5.5.310.0030.08721.38
5.5.300.0100.04721.24
5.5.290.0100.08021.26
5.5.280.0070.08321.20
5.5.270.0230.04021.04
5.5.260.0100.08021.23
5.5.250.0130.08020.98
5.5.240.0030.08720.43
5.5.230.0100.07720.76
5.5.220.0030.08320.66
5.5.210.0170.07020.54
5.5.200.0070.07320.55
5.5.190.0070.08320.73
5.5.180.0070.07320.73
5.5.160.0100.05020.62
5.5.150.0100.07720.61
5.5.140.0100.04320.54
5.5.130.0070.08020.61
5.5.120.0070.08020.52
5.5.110.0100.08020.44
5.5.100.0170.07020.41
5.5.90.0070.08020.38
5.5.80.0100.08020.53
5.5.70.0070.08020.44
5.5.60.0100.07720.36
5.5.50.0100.04320.68
5.5.40.0200.06320.45
5.5.30.0070.08020.36
5.5.20.0100.07720.36
5.5.10.0070.05020.47
5.5.00.0030.08020.65
5.4.450.0030.07719.92
5.4.440.0100.07319.56
5.4.430.0100.06719.58
5.4.420.0100.08019.57
5.4.410.0030.08319.83
5.4.400.0070.07719.46
5.4.390.0170.07019.63
5.4.380.0100.07719.26
5.4.370.0100.08019.56
5.4.360.0100.07719.20
5.4.350.0130.04019.27
5.4.340.0100.07019.65
5.4.320.0030.08319.29
5.4.310.0070.04719.54
5.4.300.0030.04719.65
5.4.290.0070.07719.26
5.4.280.0030.08719.24
5.4.270.0130.07019.65
5.4.260.0170.06719.23
5.4.250.0100.07319.19
5.4.240.0100.07019.49
5.4.230.0030.07319.25
5.4.220.0100.07319.63
5.4.210.0070.07719.19
5.4.200.0130.07019.63
5.4.190.0130.07319.25
5.4.180.0100.05719.54
5.4.170.0030.08019.23
5.4.160.0030.08719.21
5.4.150.0070.07319.43
5.4.140.0030.07716.65
5.4.130.0030.08016.77
5.4.120.0070.06716.80
5.4.110.0130.03316.68
5.4.100.0100.07016.98
5.4.90.0000.08016.62
5.4.80.0030.07016.76
5.4.70.0000.05316.95
5.4.60.0030.07716.77
5.4.50.0100.06716.66
5.4.40.0070.07316.83
5.4.30.0100.07016.84
5.4.20.0000.04716.85
5.4.10.0070.07316.84
5.4.00.0030.07716.11
5.3.290.0100.07014.88
5.3.280.0000.07714.83
5.3.270.0030.07714.70
5.3.260.0070.07314.76
5.3.250.0100.06714.77
5.3.240.0070.07714.85
5.3.230.0030.07314.81
5.3.220.0070.04014.85
5.3.210.0030.08314.71
5.3.200.0070.03314.81
5.3.190.0070.05314.71
5.3.180.0000.07714.71
5.3.170.0000.04014.73
5.3.160.0130.05314.73
5.3.150.0100.07314.77
5.3.140.0100.07714.57
5.3.130.0070.07714.74
5.3.120.0100.05714.75
5.3.110.0130.06314.75
5.3.100.0070.07714.27
5.3.90.0070.04314.20
5.3.80.0070.06714.23
5.3.70.0170.05314.15
5.3.60.0070.06314.22
5.3.50.0070.06014.24
5.3.40.0030.03714.10
5.3.30.0000.03714.15
5.3.20.0030.03313.88
5.3.10.0070.03313.82
5.3.00.0070.03313.84
5.2.170.0030.03011.86
5.2.160.0070.05711.86
5.2.150.0030.02711.86
5.2.140.0000.03011.86
5.2.130.0030.02711.86
5.2.120.0030.04311.86
5.2.110.0070.02711.86
5.2.100.0000.03311.86
5.2.90.0000.05711.86
5.2.80.0000.03011.86
5.2.70.0030.04711.86
5.2.60.0000.03011.86
5.2.50.0000.03011.86
5.2.40.0000.03011.86
5.2.30.0000.03311.86
5.2.20.0030.02711.86
5.2.10.0070.02311.86
5.2.00.0000.04011.86
5.1.60.0000.02711.86
5.1.50.0070.03311.86
5.1.40.0030.03011.86
5.1.30.0000.03011.86
5.1.20.0030.02311.86
5.1.10.0030.02311.86
5.1.00.0070.03311.86
5.0.50.0030.02011.86
5.0.40.0030.02311.86
5.0.30.0000.03311.86
5.0.20.0000.02311.86
5.0.10.0000.02011.86
5.0.00.0000.03711.86
4.4.90.0000.01711.86
4.4.80.0030.01311.86
4.4.70.0030.01311.86
4.4.60.0000.02011.86
4.4.50.0000.01711.86
4.4.40.0070.03311.86
4.4.30.0000.01711.86
4.4.20.0000.02311.86
4.4.10.0070.01011.86
4.4.00.0070.04011.86
4.3.110.0030.01311.86
4.3.100.0000.02711.86
4.3.90.0070.01011.86
4.3.80.0030.02311.86
4.3.70.0070.01011.86
4.3.60.0000.01711.86
4.3.50.0000.01711.86
4.3.40.0030.03011.86
4.3.30.0030.01311.86
4.3.20.0030.02711.86
4.3.10.0030.01711.86
4.3.00.0030.01311.86

preferences:
48.54 ms | 400 KiB | 5 Q