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.0100.00822.18
8.3.40.0180.00319.14
8.3.30.0060.01219.32
8.3.20.0040.00420.73
8.3.10.0000.00823.89
8.3.00.0040.00422.76
8.2.180.0060.00917.00
8.2.170.0110.00722.96
8.2.160.0070.00722.38
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.01026.16
8.2.120.0050.00222.25
8.2.110.0060.00322.33
8.2.100.0080.00418.03
8.2.90.0040.00419.17
8.2.80.0040.00418.18
8.2.70.0000.00817.75
8.2.60.0070.00418.05
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0040.00418.35
8.2.20.0050.00317.95
8.2.10.0030.00619.53
8.2.00.0050.00317.96
8.1.280.0070.01125.92
8.1.270.0040.00422.22
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0000.00924.10
8.1.230.0080.00319.21
8.1.220.0040.00417.77
8.1.210.0030.00618.77
8.1.200.0030.00617.25
8.1.190.0040.00417.63
8.1.180.0050.00318.10
8.1.170.0060.00318.63
8.1.160.0030.00622.07
8.1.150.0040.00418.80
8.1.140.0000.00717.57
8.1.130.0030.00318.09
8.1.120.0000.00717.64
8.1.110.0050.00217.58
8.1.100.0000.00717.59
8.1.90.0090.00017.69
8.1.80.0030.00317.52
8.1.70.0000.00717.57
8.1.60.0060.00317.71
8.1.50.0050.00317.67
8.1.40.0030.00517.70
8.1.30.0060.00317.82
8.1.20.0000.00917.82
8.1.10.0040.00417.63
8.1.00.0040.00417.58
8.0.300.0000.00718.77
8.0.290.0000.00817.30
8.0.280.0030.00318.52
8.0.270.0000.00717.39
8.0.260.0030.00317.02
8.0.250.0040.00417.05
8.0.240.0070.00017.10
8.0.230.0040.00417.07
8.0.220.0050.00216.95
8.0.210.0030.00616.89
8.0.200.0000.00817.09
8.0.190.0040.00417.11
8.0.180.0040.00416.94
8.0.170.0000.00716.99
8.0.160.0040.00416.95
8.0.150.0070.00016.95
8.0.140.0000.00716.85
8.0.130.0030.00313.54
8.0.120.0040.00416.92
8.0.110.0070.00017.03
8.0.100.0000.00716.93
8.0.90.0040.00416.92
8.0.80.0080.00917.03
8.0.70.0050.00216.83
8.0.60.0040.00416.94
8.0.50.0040.00417.14
8.0.30.0110.01117.16
8.0.20.0100.00917.44
8.0.10.0040.00417.03
8.0.00.0060.01316.73
7.4.330.0050.00015.28
7.4.320.0000.00716.75
7.4.300.0040.00416.65
7.4.290.0030.00716.63
7.4.280.0030.00316.64
7.4.270.0080.00316.59
7.4.260.0050.00216.58
7.4.250.0000.00816.49
7.4.240.0020.00616.68
7.4.230.0030.00316.83
7.4.220.0140.01116.56
7.4.210.0110.00716.88
7.4.200.0030.00316.82
7.4.190.0000.00716.88
7.4.160.0090.00916.71
7.4.150.0140.00317.40
7.4.140.0170.00417.86
7.4.130.0050.01216.64
7.4.120.0110.00616.78
7.4.110.0090.00916.72
7.4.100.0100.00716.43
7.4.90.0160.00516.67
7.4.80.0150.00619.39
7.4.70.0140.00316.64
7.4.60.0110.01116.54
7.4.50.0000.00916.50
7.4.40.0030.01322.77
7.4.30.0130.00716.82
7.4.00.0060.00615.29
7.3.330.0000.00813.58
7.3.320.0030.00313.54
7.3.310.0000.00716.41
7.3.300.0030.00316.40
7.3.290.0070.01416.41
7.3.280.0090.00816.35
7.3.270.0060.01217.40
7.3.260.0110.00716.71
7.3.250.0070.01016.62
7.3.240.0060.01016.51
7.3.230.0100.00716.53
7.3.210.0120.01116.38
7.3.200.0100.00619.39
7.3.190.0030.01416.39
7.3.180.0060.00916.55
7.3.170.0140.00316.59
7.3.160.0080.00816.70
7.3.120.0100.00314.86
7.2.330.0060.01116.77
7.2.320.0090.00916.86
7.2.310.0070.01017.00
7.2.300.0080.00816.54
7.2.290.0030.01316.86
7.2.60.0110.00416.72
7.2.00.0100.00319.73
7.1.200.0050.00515.86
7.1.100.0070.01318.34
7.1.70.0060.00317.14
7.1.60.0070.01719.29
7.1.50.0100.01416.86
7.1.00.0000.07722.58
7.0.200.0070.00316.63
7.0.140.0100.06721.99
7.0.60.0030.04020.10
7.0.50.0100.06717.81
7.0.40.0170.07320.33
7.0.30.0300.07020.22
7.0.20.0300.07320.19
7.0.10.0230.06320.14
7.0.00.0100.08020.21
5.6.280.0030.07321.12
5.6.210.0070.04020.69
5.6.200.0100.07318.33
5.6.190.0070.04320.70
5.6.180.0100.05720.67
5.6.170.0270.07720.64
5.6.160.0100.04020.64
5.6.150.0030.04718.21
5.6.140.0030.08718.29
5.6.130.0030.04018.23
5.6.120.0000.08021.02
5.6.110.0030.07321.14
5.6.100.0100.06721.01
5.6.90.0070.08721.09
5.6.80.0100.07320.59
5.6.70.0370.07020.52
5.5.350.0100.08020.49
5.5.340.0070.07718.09
5.5.330.0000.08720.34
5.5.320.0070.04320.39
5.5.310.0130.04320.48
5.5.300.0170.07717.99
5.5.290.0070.08318.14
5.5.280.0030.04320.74
5.5.270.0030.08721.00
5.5.260.0100.06320.79
5.5.250.0100.07320.67
5.5.240.0100.06720.38
5.4.450.1230.03319.62
5.4.440.0270.07319.65
5.4.430.0170.08019.54
5.4.420.0230.05719.69
5.4.410.0130.05018.77
5.4.400.0170.06718.57
5.4.390.0130.05018.58
5.4.380.0030.06318.86
5.4.370.0100.05718.81
5.4.360.0200.07018.65
5.4.350.0200.05018.86
5.4.340.0200.04718.76
5.4.320.0040.03812.55
5.4.310.0050.03912.55
5.4.300.0040.04212.55
5.4.290.0070.03612.55
5.4.280.0100.04612.42
5.4.270.0050.04012.41
5.4.260.0050.05612.41
5.4.250.0100.07412.42
5.4.240.0080.05112.42
5.4.230.0090.06712.41
5.4.220.0100.05312.41
5.4.210.0050.05412.41
5.4.200.0080.05412.41
5.4.190.0040.05612.41
5.4.180.0070.04812.41
5.4.170.0060.04812.42
5.4.160.0070.03812.41
5.4.150.0120.07412.41
5.4.140.0100.05112.09
5.4.130.0080.04812.07
5.4.120.0130.05812.03
5.4.110.0070.07112.04
5.4.100.0050.08412.03
5.4.90.0100.05012.03
5.4.80.0120.05812.03
5.4.70.0090.04612.02
5.4.60.0120.05012.03
5.4.50.0080.05012.03
5.4.40.0100.05412.02
5.4.30.0080.06112.01
5.4.20.0110.04612.01
5.4.10.0120.05012.02
5.4.00.0080.05511.51
5.3.290.0060.04012.80
5.3.280.0140.04612.71
5.3.270.0090.07212.73
5.3.260.0120.06212.72
5.3.250.0120.06412.72
5.3.240.0140.05512.72
5.3.230.0080.06212.71
5.3.220.0070.06312.68
5.3.210.0060.07012.68
5.3.200.0090.04812.68
5.3.190.0090.03712.68
5.3.180.0080.03812.67
5.3.170.0030.04312.66
5.3.160.0070.04812.67
5.3.150.0110.06212.67
5.3.140.0130.05812.66
5.3.130.0040.04412.66
5.3.120.0060.04212.66
5.3.110.0050.04312.66
5.3.100.0090.03812.13
5.3.90.0110.04212.11
5.3.80.0070.03912.11
5.3.70.0080.03712.11
5.3.60.0060.03812.09
5.3.50.0090.04612.04
5.3.40.0190.06112.04
5.3.30.0070.03912.00
5.3.20.0090.03711.78
5.3.10.0080.04211.75
5.3.00.0160.07711.73
5.2.170.0060.0359.23
5.2.160.0100.0369.23
5.2.150.0040.0429.23
5.2.140.0060.0389.23
5.2.130.0050.0409.18
5.2.120.0090.0389.18
5.2.110.0060.0379.19
5.2.100.0100.0369.19
5.2.90.0030.0339.19
5.2.80.0060.0339.19
5.2.70.0050.0399.18
5.2.60.0060.0419.14
5.2.50.0070.0309.11
5.2.40.0080.0369.08
5.2.30.0080.0389.06
5.2.20.0100.0389.05
5.2.10.0080.0378.96
5.2.00.0130.0478.82
5.1.60.0060.0388.11
5.1.50.0050.0378.11
5.1.40.0060.0448.09
5.1.30.0080.0578.43
5.1.20.0100.0438.45
5.1.10.0080.0708.18
5.1.00.0090.0658.19
5.0.50.0050.0316.66
5.0.40.0060.0406.53
5.0.30.0030.0506.33
5.0.20.0020.0296.30
5.0.10.0040.0286.28
5.0.00.0040.0406.27
4.4.90.0050.0244.78
4.4.80.0070.0214.76
4.4.70.0090.0274.75
4.4.60.0050.0344.76
4.4.50.0070.0504.77
4.4.40.0020.0384.71
4.4.30.0060.0224.75
4.4.20.0060.0224.85
4.4.10.0030.0244.85
4.4.00.0090.0414.76
4.3.110.0070.0224.67
4.3.100.0120.0184.67
4.3.90.0060.0254.64
4.3.80.0050.0304.58
4.3.70.0060.0264.63
4.3.60.0040.0234.63
4.3.50.0070.0204.63
4.3.40.0090.0654.54
4.3.30.0060.0363.33
4.3.20.0110.0313.31
4.3.10.0030.0213.27
4.3.00.0000.01313.64

preferences:
35.18 ms | 401 KiB | 5 Q