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.01118.30
8.3.50.0090.00722.04
8.3.40.0140.00718.96
8.3.30.0100.00319.50
8.3.20.0080.00020.46
8.3.10.0080.00023.65
8.3.00.0040.00420.91
8.2.180.0150.00618.66
8.2.170.0070.01022.96
8.2.160.0070.00722.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.21
8.2.110.0000.00922.43
8.2.100.0000.01118.03
8.2.90.0040.00419.31
8.2.80.0000.00818.05
8.2.70.0080.00017.75
8.2.60.0030.00518.15
8.2.50.0060.00318.07
8.2.40.0040.00419.44
8.2.30.0040.00418.29
8.2.20.0080.00017.77
8.2.10.0030.00619.58
8.2.00.0030.00517.91
8.1.280.0120.00325.92
8.1.270.0040.00424.00
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00023.99
8.1.230.0090.00319.28
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0040.00417.52
8.1.180.0000.00918.10
8.1.170.0000.00818.74
8.1.160.0070.00022.21
8.1.150.0040.00418.84
8.1.140.0050.00317.62
8.1.130.0030.00317.99
8.1.120.0040.00417.65
8.1.110.0040.00417.50
8.1.100.0040.00417.64
8.1.90.0050.00417.53
8.1.80.0030.00317.51
8.1.70.0000.00717.60
8.1.60.0030.00517.70
8.1.50.0050.00317.53
8.1.40.0040.00417.52
8.1.30.0000.00817.69
8.1.20.0040.00417.88
8.1.10.0030.00717.64
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0080.00017.30
8.0.280.0030.00318.59
8.0.270.0040.00417.32
8.0.260.0000.00716.87
8.0.250.0000.00717.09
8.0.240.0070.00017.14
8.0.230.0000.00717.13
8.0.220.0000.00616.93
8.0.210.0000.00817.06
8.0.200.0040.00417.07
8.0.190.0030.00516.98
8.0.180.0070.00017.02
8.0.170.0030.00617.05
8.0.160.0050.00317.18
8.0.150.0070.00017.09
8.0.140.0060.00317.00
8.0.130.0000.00513.55
8.0.120.0000.00717.03
8.0.110.0040.00417.02
8.0.100.0070.00016.89
8.0.90.0000.00716.99
8.0.80.0130.00317.04
8.0.70.0000.00816.83
8.0.60.0040.00417.06
8.0.50.0040.00417.16
8.0.30.0080.01017.21
8.0.20.0140.00417.40
8.0.10.0070.00016.99
8.0.00.0080.01217.00
7.4.330.0000.00615.27
7.4.320.0000.00616.65
7.4.300.0060.00016.78
7.4.290.0070.00016.66
7.4.280.0070.00016.65
7.4.270.0050.00316.77
7.4.260.0030.00516.54
7.4.250.0060.00316.64
7.4.240.0040.00416.62
7.4.230.0070.00016.58
7.4.220.0130.01316.74
7.4.210.0060.01116.80
7.4.200.0080.00016.91
7.4.190.0000.00716.62
7.4.160.0120.00416.57
7.4.150.0030.01417.40
7.4.140.0120.01017.86
7.4.130.0110.00516.50
7.4.120.0070.01116.59
7.4.110.0090.00916.49
7.4.100.0030.01716.68
7.4.90.0140.00316.53
7.4.80.0170.00016.71
7.4.70.0060.01016.66
7.4.60.0040.01416.71
7.4.50.0060.00316.43
7.4.40.0060.00622.77
7.4.30.0130.00416.73
7.4.00.0090.00915.11
7.3.330.0000.00513.32
7.3.320.0000.00513.52
7.3.310.0050.00216.45
7.3.300.0000.00616.41
7.3.290.0070.01316.37
7.3.280.0060.01216.31
7.3.270.0150.00317.40
7.3.260.0080.00816.39
7.3.250.0040.01416.65
7.3.240.0080.01116.51
7.3.230.0000.01616.61
7.3.210.0120.00616.54
7.3.200.0000.01819.39
7.3.190.0170.00316.71
7.3.180.0060.01016.65
7.3.170.0100.00616.47
7.3.160.0090.00916.23
7.3.120.0090.00714.93
7.3.110.0080.00914.79
7.3.100.0090.00914.87
7.3.90.0070.00714.86
7.3.80.0080.00514.85
7.3.70.0110.00314.79
7.3.60.0070.00814.82
7.3.50.0070.00814.88
7.3.40.0070.00614.73
7.3.30.0070.00414.74
7.3.20.0070.00616.63
7.3.10.0070.00816.54
7.3.00.0040.00816.66
7.2.330.0100.00716.87
7.2.320.0120.01216.76
7.2.310.0130.00317.01
7.2.300.0120.01216.95
7.2.290.0110.00816.87
7.2.250.0110.00715.24
7.2.240.0090.01015.23
7.2.230.0040.01115.04
7.2.220.0050.01115.18
7.2.210.0070.00415.21
7.2.200.0100.00415.02
7.2.190.0060.00915.19
7.2.180.0050.01114.98
7.2.170.0040.00815.12
7.2.160.0100.01015.12
7.2.150.0060.00317.09
7.2.140.0060.00917.19
7.2.130.0070.00616.65
7.2.120.0080.00816.81
7.2.110.0020.01416.76
7.2.100.0060.01016.71
7.2.90.0050.01016.83
7.2.80.0060.00916.94
7.2.70.0000.01216.93
7.2.60.0030.00917.04
7.2.50.0060.00617.15
7.2.40.0050.01217.07
7.2.30.0040.01116.88
7.2.20.0070.00516.89
7.2.10.0080.00716.94
7.2.00.0030.00917.70
7.1.330.0040.01215.66
7.1.320.0050.00815.84
7.1.310.0070.00415.77
7.1.300.0090.00515.76
7.1.290.0060.00415.99
7.1.280.0070.00615.92
7.1.270.0020.01015.88
7.1.260.0060.00915.78
7.1.250.0030.00715.58
7.1.240.0030.01416.09
7.1.230.0060.00615.62
7.1.220.0040.00415.98
7.1.210.0070.00415.90
7.1.200.0110.00715.77
7.1.190.0000.00915.81
7.1.180.0060.00615.82
7.1.170.0050.00515.68
7.1.160.0070.01015.96
7.1.150.0080.00415.83
7.1.140.0090.00615.84
7.1.130.0120.00315.61
7.1.120.0050.00515.98
7.1.110.0060.01015.93
7.1.100.0120.00617.15
7.1.90.0090.00315.77
7.1.80.0080.00615.95
7.1.70.0060.00916.59
7.1.60.0050.01217.64
7.1.50.0070.00916.53
7.1.40.0070.00415.61
7.1.30.0100.00715.53
7.1.20.0000.01315.81
7.1.10.0060.01016.10
7.1.00.0050.04019.26
7.0.330.0030.01015.63
7.0.320.0030.01015.56
7.0.310.0110.00315.15
7.0.300.0030.01115.33
7.0.290.0030.00715.42
7.0.280.0000.01115.55
7.0.270.0000.01515.56
7.0.260.0040.01115.64
7.0.250.0060.01215.54
7.0.240.0100.00015.31
7.0.230.0060.00615.35
7.0.220.0060.00315.32
7.0.210.0030.01515.26
7.0.200.0130.00716.19
7.0.190.0080.00015.29
7.0.180.0060.00315.61
7.0.170.0030.01015.54
7.0.160.0030.00915.64
7.0.150.0110.00415.20
7.0.140.0080.03818.71
7.0.130.0030.00915.63
7.0.120.0110.00015.38
7.0.110.0070.00715.62
7.0.100.0060.00315.62
7.0.90.0000.01615.49
7.0.80.0250.04717.73
7.0.70.0320.02117.71
7.0.60.0320.04217.72
7.0.50.0230.02618.05
7.0.40.0090.04016.78
7.0.30.0080.03717.01
7.0.20.0020.03516.93
7.0.10.0090.02716.96
7.0.00.0060.04216.88
5.6.400.0090.00614.59
5.6.390.0000.01114.70
5.6.380.0070.00314.46
5.6.370.0060.00314.80
5.6.360.0070.00714.33
5.6.350.0030.00914.49
5.6.340.0030.01014.79
5.6.330.0030.00614.51
5.6.320.0090.00614.58
5.6.310.0080.00314.27
5.6.300.0030.01314.95
5.6.290.0090.00314.77
5.6.280.0050.00514.64
5.6.270.0090.00614.44
5.6.260.0070.00714.70
5.6.250.0130.00014.63
5.6.240.0000.01114.48
5.6.230.0070.04217.65
5.6.220.0100.04217.53
5.6.210.0010.02817.52
5.6.200.0100.04517.72
5.6.190.0070.02217.98
5.6.180.0050.04817.88
5.6.170.0110.03617.62
5.6.160.0070.04417.72
5.6.150.0080.03317.93
5.6.140.0100.04118.04
5.6.130.0090.02817.84
5.6.120.0050.05117.80
5.6.110.0080.04217.81
5.6.100.0100.02817.71
5.6.90.0090.04317.72
5.6.80.0120.04017.62
5.6.70.0080.03817.32
5.6.60.0070.03017.32
5.6.50.0030.04217.65
5.6.40.0050.04417.57
5.6.30.0100.04017.41
5.6.20.0170.03717.47
5.6.10.0050.04317.52
5.6.00.0070.02917.57
5.5.380.0030.00614.50
5.5.370.0050.02617.43
5.5.360.0120.04217.55
5.5.350.0070.03517.41
5.5.340.0100.04617.88
5.5.330.0050.02817.63
5.5.320.0030.05017.82
5.5.310.0130.03517.87
5.5.300.0050.04117.68
5.5.290.0110.04117.68
5.5.280.0060.02817.71
5.5.270.0070.04617.74
5.5.260.0050.04317.66
5.5.250.0050.04717.67
5.5.240.0050.04217.48
5.5.230.0070.03917.34
5.5.220.0090.03217.25
5.5.210.0050.04517.34
5.5.200.0030.04317.23
5.5.190.0060.04717.49
5.5.180.0050.04617.34
5.5.170.0000.01414.41
5.5.160.0070.04017.29
5.5.150.0120.03717.21
5.5.140.0090.04117.37
5.5.130.0070.04217.28
5.5.120.0050.03217.46
5.5.110.0030.04617.36
5.5.100.0140.03617.33
5.5.90.0080.03317.32
5.5.80.0070.03917.31
5.5.70.0070.03917.14
5.5.60.0040.03617.32
5.5.50.0030.03017.14
5.5.40.0050.03317.29
5.5.30.0060.02617.16
5.5.20.0040.02317.32
5.5.10.0020.03617.42
5.5.00.0050.02317.15
5.4.450.0030.04015.85
5.4.440.0080.04015.93
5.4.430.0020.04515.98
5.4.420.0050.03815.89
5.4.410.0040.04515.88
5.4.400.0070.03915.79
5.4.390.0020.04415.84
5.4.380.0070.03815.74
5.4.370.0030.02515.83
5.4.360.0100.03115.83
5.4.350.0060.03515.73
5.4.340.0030.04015.70
5.4.330.0000.01012.36
5.4.320.0070.04015.66
5.4.310.0030.04415.79
5.4.300.0040.04515.76
5.4.290.0060.03915.82
5.4.280.0020.04015.73
5.4.270.0000.04515.80
5.4.260.0140.03215.73
5.4.250.0050.04215.83
5.4.240.0100.03715.76
5.4.230.0060.02315.78
5.4.220.0020.02315.82
5.4.210.0050.02015.69
5.4.200.0060.03515.66
5.4.190.0050.02515.68
5.4.180.0050.02415.67
5.4.170.0020.02215.78
5.4.160.0030.02215.77
5.4.150.0030.02315.70
5.4.140.0040.02014.44
5.4.130.0020.02314.44
5.4.120.0050.02214.41
5.4.110.0030.02214.47
5.4.100.0000.02414.41
5.4.90.0100.02114.44
5.4.80.0050.02514.46
5.4.70.0090.01414.47
5.4.60.0050.03214.40
5.4.50.0060.02014.45
5.4.40.0020.02214.41
5.4.30.0050.04014.38
5.4.20.0010.02714.36
5.4.10.0020.02014.38
5.4.00.0040.01914.13
5.3.290.0050.03513.51
5.3.280.0060.02413.52
5.3.270.0020.02713.55
5.3.260.0030.02013.55
5.3.250.0020.02313.50
5.3.240.0060.02113.54
5.3.230.0020.02113.52
5.3.220.0020.02313.47
5.3.210.0020.02313.54
5.3.200.0050.01813.48
5.3.190.0020.03013.46
5.3.180.0050.01513.44
5.3.170.0040.03413.54
5.3.160.0020.02313.47
5.3.150.0070.01713.53
5.3.140.0020.02313.52
5.3.130.0040.01713.49
5.3.120.0110.02713.47
5.3.110.0040.03313.49
5.3.100.0060.01813.19
5.3.90.0030.04013.18
5.3.80.0030.03013.16
5.3.70.0050.02313.27
5.3.60.0030.02813.21
5.3.50.0050.03713.15
5.3.40.0040.02013.22
5.3.30.0100.01313.16
5.3.20.0000.02213.04
5.3.10.0030.02113.04
5.3.00.0100.03413.00
5.2.170.0000.02713.56
5.2.160.0070.03013.56
5.2.150.0000.03713.56
5.2.140.0070.05713.56
5.2.130.0000.04013.56
5.2.120.0030.03013.56
5.2.110.0000.03713.56
5.2.100.0030.02313.56
5.2.90.0030.02313.56
5.2.80.0070.03013.56
5.2.70.0000.03313.56
5.2.60.0000.03013.56
5.2.50.0070.03313.56
5.2.40.0000.03313.56
5.2.30.0000.03013.56
5.2.20.0070.06313.56
5.2.10.0030.03313.56
5.2.00.0030.02313.56
5.1.60.0000.03013.56
5.1.50.0070.02013.56
5.1.40.0070.01713.56
5.1.30.0000.02713.56
5.1.20.0030.02313.56
5.1.10.0070.04713.56
5.1.00.0030.04713.56
5.0.50.0070.04013.56
5.0.40.0200.02713.56
5.0.30.0000.06713.56
5.0.20.0070.04013.56
5.0.10.0000.04013.56
5.0.00.0030.06313.56
4.4.90.0030.01313.56
4.4.80.0000.01313.56
4.4.70.0030.01013.56
4.4.60.0000.01713.56
4.4.50.0070.02313.56
4.4.40.0070.04313.56
4.4.30.0000.01713.56
4.4.20.0070.03313.56
4.4.10.0030.03713.56
4.4.00.0000.04713.56
4.3.110.0070.03313.56
4.3.100.0000.03313.56
4.3.90.0070.03013.56
4.3.80.0000.05713.56
4.3.70.0030.03313.56
4.3.60.0070.03013.56
4.3.50.0000.04013.56
4.3.40.0030.05013.56
4.3.30.0030.03713.56
4.3.20.0000.03713.56
4.3.10.0130.02013.56
4.3.00.0070.03013.56

preferences:
43.97 ms | 401 KiB | 5 Q