3v4l.org

run code in 300+ PHP versions simultaneously
<?php print "omg"; $parts = parse_url("http://9999%00?:@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.0170.00317.13
8.3.50.0070.01422.18
8.3.40.0110.00419.09
8.3.30.0090.00619.48
8.3.20.0040.00420.56
8.3.10.0030.00523.90
8.3.00.0040.00420.89
8.2.180.0120.00317.00
8.2.170.0150.00022.96
8.2.160.0110.00322.24
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00322.38
8.2.110.0070.01120.66
8.2.100.0080.00417.97
8.2.90.0000.00819.32
8.2.80.0040.00418.05
8.2.70.0070.00317.60
8.2.60.0060.00318.15
8.2.50.0000.00818.07
8.2.40.0060.00318.41
8.2.30.0050.00318.30
8.2.20.0000.00817.77
8.2.10.0040.00417.95
8.2.00.0030.00617.84
8.1.280.0090.00625.92
8.1.270.0040.00423.98
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00322.08
8.1.230.0070.00424.02
8.1.220.0040.00417.77
8.1.210.0000.00918.77
8.1.200.0040.00417.35
8.1.190.0040.00717.54
8.1.180.0040.00418.10
8.1.170.0040.00418.79
8.1.160.0070.00022.19
8.1.150.0040.00418.87
8.1.140.0050.00317.72
8.1.130.0000.00717.99
8.1.120.0000.00817.53
8.1.110.0000.00817.59
8.1.100.0000.00717.64
8.1.90.0000.00817.63
8.1.80.0000.00717.61
8.1.70.0040.00417.63
8.1.60.0030.00617.76
8.1.50.0030.00517.64
8.1.40.0040.00417.70
8.1.30.0000.00817.67
8.1.20.0030.00517.73
8.1.10.0000.00917.75
8.1.00.0030.00617.66
8.0.300.0000.00818.77
8.0.290.0070.00017.40
8.0.280.0030.00318.64
8.0.270.0060.00317.41
8.0.260.0030.00316.98
8.0.250.0030.00317.08
8.0.240.0000.00817.09
8.0.230.0000.00717.09
8.0.220.0030.00316.98
8.0.210.0000.00717.08
8.0.200.0000.01017.10
8.0.190.0060.00317.07
8.0.180.0040.00417.00
8.0.170.0000.00817.07
8.0.160.0080.00017.06
8.0.150.0040.00416.95
8.0.140.0040.00416.98
8.0.130.0030.00313.44
8.0.120.0030.00617.07
8.0.110.0040.00417.12
8.0.100.0080.00017.06
8.0.90.0000.00716.90
8.0.80.0040.01217.04
8.0.70.0000.00717.16
8.0.60.0000.00717.06
8.0.50.0050.00217.16
8.0.30.0110.01117.18
8.0.20.0100.01117.46
8.0.10.0040.00417.27
8.0.00.0100.00917.05
7.4.330.0000.00515.35
7.4.320.0020.00516.62
7.4.300.0030.00316.68
7.4.290.0040.00716.81
7.4.280.0050.00216.64
7.4.270.0030.00316.66
7.4.260.0070.00016.75
7.4.250.0040.00416.71
7.4.240.0020.00616.80
7.4.230.0040.00416.88
7.4.220.0090.00916.81
7.4.210.0040.01116.89
7.4.200.0000.00716.80
7.4.190.0040.00316.73
7.4.160.0060.01616.89
7.4.150.0120.00617.40
7.4.140.0080.01117.86
7.4.130.0120.00516.83
7.4.120.0130.00816.79
7.4.110.0090.00916.71
7.4.100.0120.00916.81
7.4.90.0090.01616.79
7.4.80.0080.01216.71
7.4.70.0070.01016.66
7.4.60.0120.01216.74
7.4.50.0050.00316.80
7.4.40.0040.01422.77
7.4.30.0070.01016.74
7.4.00.0070.00915.15
7.3.330.0050.00013.53
7.3.320.0030.00313.37
7.3.310.0000.00716.71
7.3.300.0040.00416.64
7.3.290.0030.01216.52
7.3.280.0110.00816.49
7.3.270.0110.01017.40
7.3.260.0420.03116.55
7.3.250.0130.00616.68
7.3.240.0140.01016.70
7.3.230.0120.00616.78
7.3.210.0100.00716.54
7.3.200.0110.00819.39
7.3.190.0100.01016.54
7.3.180.0060.01216.71
7.3.170.0100.00616.69
7.3.160.0090.00816.50
7.3.120.0070.01115.03
7.3.110.0130.00615.05
7.3.100.0120.00314.98
7.3.90.0090.00914.90
7.3.80.0070.00715.03
7.3.70.0040.01415.05
7.3.60.0040.01214.77
7.3.50.0080.00614.95
7.3.40.0070.00414.95
7.3.30.0030.01015.00
7.3.20.0030.00916.74
7.3.10.0040.01116.79
7.3.00.0000.01216.66
7.2.330.0160.00317.05
7.2.320.0060.01116.69
7.2.310.0110.00717.09
7.2.300.0140.00616.71
7.2.290.0030.01817.07
7.2.250.0040.01515.13
7.2.240.0140.00615.56
7.2.230.0040.01115.50
7.2.220.0070.00714.77
7.2.210.0000.01415.31
7.2.200.0030.01315.27
7.2.190.0030.01615.36
7.2.180.0060.00915.42
7.2.170.0130.00315.30
7.2.60.0060.00917.18
7.2.00.0060.00919.69
7.1.330.0060.00916.09
7.1.320.0030.01015.96
7.1.310.0040.01215.84
7.1.300.0070.01116.10
7.1.290.0060.00916.14
7.1.280.0030.01316.18
7.1.270.0060.00916.04
7.1.260.0090.00615.89
7.1.200.0030.01016.16
7.1.100.0000.01318.47
7.1.70.0060.00317.33
7.1.60.0140.01119.27
7.1.50.0030.01017.21
7.1.00.0070.07322.63
7.0.200.0080.00416.71
7.0.140.0130.06322.37
7.0.60.0170.07020.04
7.0.50.0130.07317.96
7.0.40.0030.08320.32
7.0.30.0400.07720.23
7.0.20.0270.05320.32
7.0.10.0230.06720.20
7.0.00.0130.08020.31
5.6.280.0030.07321.18
5.6.210.0100.07720.71
5.6.200.0000.04318.34
5.6.190.0100.06020.52
5.6.180.0070.04020.67
5.6.170.0300.08320.61
5.6.160.0070.04020.46
5.6.150.0030.08718.35
5.6.140.0100.05318.22
5.6.130.0230.07018.29
5.6.120.0130.07721.23
5.6.110.0100.04321.07
5.6.100.0070.04321.04
5.6.90.0100.08021.03
5.6.80.0030.04020.53
5.6.70.2470.03720.43
5.5.350.0030.05720.44
5.5.340.0070.03718.03
5.5.330.0030.09720.46
5.5.320.0030.08020.58
5.5.310.0200.08020.34
5.5.300.0030.04718.05
5.5.290.0030.09018.05
5.5.280.0130.03721.04
5.5.270.0070.07320.93
5.5.260.0100.08020.70
5.5.250.0170.07720.85
5.5.240.0130.06320.32
5.4.450.0170.04019.71
5.4.440.0130.04019.38
5.4.430.0270.02719.52
5.4.420.0230.03319.61
5.4.410.0400.04319.17
5.4.400.0330.06019.02
5.4.390.0200.05019.27
5.4.380.0270.06719.01
5.4.370.0170.05719.21
5.4.360.0270.07019.13
5.4.350.0330.07019.32
5.4.340.0200.06719.14
5.4.320.0170.05719.26
5.4.310.0270.04319.13
5.4.300.0230.07019.25
5.4.290.0200.07319.09
5.4.280.0300.06719.16
5.4.270.0200.05319.26
5.4.260.0230.04019.38
5.4.250.0200.04319.15
5.4.240.0200.07319.25
5.4.230.0300.06719.01
5.4.220.0200.05719.14
5.4.210.0170.04019.10
5.4.200.0200.06719.21
5.4.190.0230.07019.28
5.4.180.0270.06719.37
5.4.170.0130.04319.05
5.4.160.0170.04719.18
5.4.150.0200.04719.27
5.4.140.0270.07316.61
5.4.130.0130.06316.60
5.4.120.0230.06716.44
5.4.110.0200.04716.70
5.4.100.0130.04016.38
5.4.90.0130.03716.68
5.4.80.0200.04016.64
5.4.70.0170.03316.45
5.4.60.0170.03316.59
5.4.50.0200.03016.57
5.4.40.0230.07016.41
5.4.30.0230.03316.59
5.4.20.0200.05716.39
5.4.10.0200.07016.40
5.4.00.0230.06715.91
5.3.290.0300.07014.67
5.3.280.0230.05014.52
5.3.270.0130.06714.77
5.3.260.0230.04014.63
5.3.250.0270.06014.54
5.3.240.0300.06314.85
5.3.230.0270.07314.61
5.3.220.0230.07014.70
5.3.210.0200.03714.80
5.3.200.0300.05714.48
5.3.190.0200.07714.48
5.3.180.0200.04314.59
5.3.170.0130.04014.48
5.3.160.0200.06314.55
5.3.150.0300.03314.71
5.3.140.0230.05714.47
5.3.130.0230.04314.68
5.3.120.0230.03314.49
5.3.110.0200.07314.65
5.3.100.0300.05714.19
5.3.90.0130.04014.05
5.3.80.0200.04314.04
5.3.70.0230.06314.10
5.3.60.0300.03313.98
5.3.50.0130.04713.97
5.3.40.0130.04014.08
5.3.30.0200.07014.02
5.3.20.0200.05713.72
5.3.10.0200.07013.72
5.3.00.0200.07013.73
5.2.170.0130.03011.09
5.2.160.0170.06011.25
5.2.150.0230.05711.26
5.2.140.0170.03311.25
5.2.130.0170.06311.27
5.2.120.0200.03011.29
5.2.110.0270.05311.20
5.2.100.0230.06311.20
5.2.90.0200.04011.03
5.2.80.0130.03711.12
5.2.70.0270.02011.04
5.2.60.0100.03310.99
5.2.50.0530.05311.08
5.2.40.0200.03011.01
5.2.30.0200.03010.99
5.2.20.0130.04311.03
5.2.10.0200.02010.88
5.2.00.0200.05010.66
5.1.60.0130.0239.98
5.1.50.0100.0339.94
5.1.40.0130.02310.01
5.1.30.0070.03010.30
5.1.20.0130.03310.48
5.1.10.0130.0509.96
5.1.00.0100.02710.16
5.0.50.0100.0208.65
5.0.40.0030.0208.66
5.0.30.0270.0408.55
5.0.20.0130.0138.55
5.0.10.0070.0208.55
5.0.00.0100.0308.55
4.4.90.0070.0138.55
4.4.80.0130.0178.55
4.4.70.0070.0178.55
4.4.60.0070.0178.55
4.4.50.0070.0138.55
4.4.40.0030.0278.55
4.4.30.0030.0178.55
4.4.20.0100.0138.55
4.4.10.0070.0138.55
4.4.00.0030.0478.55
4.3.110.0030.0178.55
4.3.100.0030.0178.55
4.3.90.0070.0138.55
4.3.80.0130.0238.55
4.3.70.0070.0138.55
4.3.60.0070.0138.55
4.3.50.0030.0178.55
4.3.40.0030.0238.55
4.3.30.0000.0178.55
4.3.20.0070.0138.55
4.3.10.0030.0208.55
4.3.00.0030.0138.55

preferences:
41.48 ms | 401 KiB | 5 Q