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.70.0080.00816.88
8.3.60.0080.00816.88
8.3.50.0110.00822.01
8.3.40.0170.00019.04
8.3.30.0170.00319.50
8.3.20.0000.00820.64
8.3.10.0060.00323.87
8.3.00.0040.00422.51
8.2.180.0060.01016.50
8.2.170.0140.00422.96
8.2.160.0100.00322.20
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00422.38
8.2.110.0080.00022.43
8.2.100.0040.00718.03
8.2.90.0080.00019.48
8.2.80.0040.00418.18
8.2.70.0030.00617.75
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0050.00318.28
8.2.30.0050.00318.41
8.2.20.0070.00017.89
8.2.10.0030.00617.79
8.2.00.0040.00417.91
8.1.280.0060.00925.92
8.1.270.0030.00524.09
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.06
8.1.230.0060.00619.14
8.1.220.0000.00817.80
8.1.210.0040.00418.77
8.1.200.0040.00417.38
8.1.190.0040.00417.52
8.1.180.0060.00318.10
8.1.170.0060.00318.70
8.1.160.0000.00722.21
8.1.150.0020.00518.71
8.1.140.0040.00417.57
8.1.130.0020.00517.53
8.1.120.0030.00317.58
8.1.110.0000.00717.65
8.1.100.0000.00717.52
8.1.90.0080.00017.71
8.1.80.0070.00017.65
8.1.70.0070.00017.56
8.1.60.0080.00017.58
8.1.50.0040.00417.47
8.1.40.0040.00417.67
8.1.30.0030.00617.79
8.1.20.0050.00217.86
8.1.10.0000.00817.75
8.1.00.0040.00417.57
8.0.300.0050.00218.77
8.0.290.0000.00717.18
8.0.280.0000.00818.48
8.0.270.0040.00417.46
8.0.260.0000.00716.93
8.0.250.0040.00417.11
8.0.240.0000.00717.06
8.0.230.0070.00017.04
8.0.220.0030.00317.04
8.0.210.0070.00016.98
8.0.200.0060.00017.09
8.0.190.0050.00217.03
8.0.180.0030.00516.96
8.0.170.0040.00416.96
8.0.160.0000.00817.12
8.0.150.0000.00716.82
8.0.140.0000.00717.01
8.0.130.0030.00313.55
8.0.120.0000.00716.91
8.0.110.0070.00017.04
8.0.100.0000.00716.97
8.0.90.0040.00416.88
8.0.80.0110.00716.92
8.0.70.0040.00417.12
8.0.60.0040.00417.11
8.0.50.0000.00717.04
8.0.30.0070.01217.41
8.0.20.0070.01217.40
8.0.10.0000.00817.06
8.0.00.0070.01416.83
7.4.330.0020.00215.24
7.4.320.0070.00016.78
7.4.300.0070.00016.66
7.4.290.0000.00716.68
7.4.280.0080.00016.70
7.4.270.0030.00616.62
7.4.260.0000.00716.78
7.4.250.0040.00416.70
7.4.240.0040.00416.63
7.4.230.0040.00316.60
7.4.220.0070.00916.82
7.4.210.0080.00816.75
7.4.200.0070.00016.58
7.4.190.0070.00016.86
7.4.160.0040.01216.78
7.4.150.0090.00917.40
7.4.140.0140.00517.86
7.4.130.0050.01316.64
7.4.120.0070.01016.70
7.4.110.0140.00316.68
7.4.100.0100.00716.29
7.4.90.0090.00916.60
7.4.80.0110.00819.39
7.4.70.0090.00616.91
7.4.60.0140.00316.64
7.4.50.0040.00416.36
7.4.40.0060.00922.77
7.4.30.0040.01816.70
7.4.00.0060.01215.10
7.3.330.0050.00213.32
7.3.320.0060.00013.30
7.3.310.0000.00716.42
7.3.300.0000.00716.29
7.3.290.0000.01516.52
7.3.280.0050.01216.43
7.3.270.0090.00917.40
7.3.260.0160.00016.51
7.3.250.0100.00816.43
7.3.240.0110.00516.61
7.3.230.0160.00616.43
7.3.210.0090.00916.53
7.3.200.0080.01119.39
7.3.190.0110.00616.48
7.3.180.0120.00816.46
7.3.170.0040.01116.49
7.3.160.0120.00316.56
7.3.120.0090.00615.00
7.3.110.0070.01115.15
7.3.100.0040.01114.98
7.3.90.0080.00314.61
7.3.80.0060.01014.52
7.3.70.0060.01014.68
7.3.60.0030.01414.89
7.3.50.0040.01114.86
7.3.40.0050.00514.89
7.3.30.0110.00414.88
7.3.20.0070.01016.45
7.3.10.0040.01116.81
7.3.00.0030.01016.69
7.2.330.0140.00616.58
7.2.320.0110.00716.98
7.2.310.0090.00916.52
7.2.300.0070.01016.84
7.2.290.0060.00916.66
7.2.250.0090.00915.38
7.2.240.0030.01614.95
7.2.230.0100.00715.34
7.2.220.0030.01215.16
7.2.210.0070.00715.45
7.2.200.0080.00815.15
7.2.190.0000.01315.20
7.2.180.0030.01215.28
7.2.170.0000.01315.27
7.2.120.0070.00716.75
7.2.110.0030.01016.76
7.2.100.0100.01316.76
7.2.90.0080.00616.53
7.2.80.0160.00416.67
7.2.70.0130.00316.86
7.2.60.0120.00417.02
7.2.50.0150.00516.78
7.2.40.0120.00817.19
7.2.30.0110.00917.17
7.2.20.0140.00617.06
7.2.10.0000.01617.04
7.2.00.0090.00718.36
7.1.330.0030.01015.98
7.1.320.0070.01015.97
7.1.310.0100.00315.77
7.1.300.0060.00615.91
7.1.290.0000.01515.80
7.1.280.0060.00615.81
7.1.270.0000.01315.64
7.1.260.0070.00715.84
7.1.240.0190.00015.48
7.1.230.0070.01115.92
7.1.220.0120.00415.62
7.1.210.0060.00715.72
7.1.200.0060.00515.97
7.1.190.0160.00015.75
7.1.180.0100.00615.89
7.1.170.0110.00515.68
7.1.160.0120.00416.00
7.1.150.0070.01115.86
7.1.140.0080.00815.95
7.1.130.0160.00015.92
7.1.120.0070.00715.88
7.1.110.0140.00316.06
7.1.100.0110.00417.22
7.1.90.0060.00915.98
7.1.80.0060.00615.95
7.1.70.0040.00816.36
7.1.60.0080.01117.49
7.1.50.0090.00916.43
7.1.40.0080.00315.78
7.1.30.0120.00315.83
7.1.20.0110.00416.07
7.1.10.0140.00316.05
7.1.00.0050.04119.10
7.0.320.0100.00715.71
7.0.310.0080.01015.67
7.0.300.0110.00415.52
7.0.290.0100.00715.46
7.0.280.0110.00515.50
7.0.270.0050.01015.61
7.0.260.0070.00715.61
7.0.250.0090.00915.63
7.0.240.0090.01215.54
7.0.230.0060.00615.66
7.0.220.0120.00615.65
7.0.210.0120.00415.45
7.0.200.0090.00516.14
7.0.190.0090.00915.48
7.0.180.0080.00715.53
7.0.170.0120.00015.44
7.0.160.0030.01115.50
7.0.150.0080.00815.46
7.0.140.0110.03518.86
7.0.130.0040.01215.63
7.0.120.0210.00615.73
7.0.110.0180.00015.52
7.0.100.0120.00415.66
7.0.90.0080.00815.48
7.0.80.0080.00815.17
7.0.70.0040.01115.50
7.0.60.0070.02217.80
7.0.50.0040.04916.79
7.0.40.0080.04316.81
7.0.30.0230.02816.89
7.0.20.0210.04016.90
7.0.10.0180.02116.86
7.0.00.0120.03816.90
5.6.380.0110.00614.55
5.6.370.0080.00814.59
5.6.360.0120.00614.64
5.6.350.0090.00614.69
5.6.340.0080.00814.79
5.6.330.0080.00814.91
5.6.320.0130.00414.60
5.6.310.0060.00614.47
5.6.300.0120.00314.62
5.6.290.0070.00714.57
5.6.280.0090.03717.71
5.6.270.0170.00314.59
5.6.260.0090.00614.43
5.6.250.0040.01314.33
5.6.240.0110.00514.38
5.6.230.0110.00814.27
5.6.220.0070.01014.85
5.6.210.0050.04717.51
5.6.200.0140.04116.22
5.6.190.0080.03817.59
5.6.180.0050.02817.50
5.6.170.0190.03117.53
5.6.160.0070.04717.51
5.6.150.0100.04216.43
5.6.140.0070.01816.29
5.6.130.0040.02616.36
5.6.120.0070.02317.97
5.6.110.0110.04017.84
5.6.100.0090.04217.79
5.6.90.0150.04017.76
5.6.80.0120.04017.51
5.6.70.0230.04017.45
5.6.60.0030.00914.51
5.6.50.0050.00914.57
5.6.40.0130.00314.36
5.6.30.0040.00814.19
5.6.20.0060.00914.45
5.6.10.0120.00414.30
5.6.00.0060.00614.59
5.5.380.0100.00311.78
5.5.370.0090.00411.27
5.5.360.0070.00211.43
5.5.350.0070.04215.88
5.5.340.0090.03314.64
5.5.330.0050.04316.13
5.5.320.0070.02215.83
5.5.310.0150.03015.82
5.5.300.0120.03014.79
5.5.290.0080.03714.68
5.5.280.0030.02516.23
5.5.270.0110.04316.13
5.5.260.0180.04016.11
5.5.250.0120.03816.03
5.5.240.0090.04115.90
5.5.230.0100.00711.38
5.5.220.0150.00011.52
5.5.210.0110.00411.36
5.5.200.0070.00711.27
5.5.190.0130.00311.27
5.5.180.0140.00311.65
5.5.170.0090.00314.61
5.5.160.0070.00711.27
5.5.150.0090.00611.27
5.5.140.0000.00911.27
5.5.130.0090.00311.27
5.5.120.0040.00711.27
5.5.110.0070.00711.58
5.5.100.0040.00411.52
5.5.90.0060.00611.27
5.5.80.0080.00511.46
5.5.70.0090.00011.27
5.5.60.0030.01111.27
5.5.50.0140.00011.27
5.5.40.0110.00511.41
5.5.30.0080.00511.44
5.5.20.0130.00011.55
5.5.10.0100.00311.27
5.5.00.0130.00011.27
5.4.450.0350.03015.57
5.4.440.0220.04115.45
5.4.430.0360.02915.52
5.4.420.0400.03615.41
5.4.410.0070.04215.31
5.4.400.0060.03115.07
5.4.390.0070.03514.98
5.4.380.0130.02715.06
5.4.370.0060.03315.10
5.4.360.0150.02315.10
5.4.350.0120.03015.04
5.4.340.0120.02814.92
5.4.330.0120.00411.45
5.4.320.0100.01712.01
5.4.310.0070.02211.91
5.4.300.0070.02512.00
5.4.290.0030.02611.90
5.4.280.0050.02611.91
5.4.270.0040.02411.90
5.4.260.0060.02311.84
5.4.250.0080.02211.84
5.4.240.0070.02111.84
5.4.230.0070.02111.84
5.4.220.0100.01911.84
5.4.210.0070.02011.95
5.4.200.0060.02311.88
5.4.190.0090.01911.84
5.4.180.0060.01911.84
5.4.170.0070.02111.84
5.4.160.0090.02111.84
5.4.150.0100.02211.84
5.4.140.0110.02011.68
5.4.130.0050.03311.72
5.4.120.0090.02111.65
5.4.110.0080.02511.65
5.4.100.0080.02211.65
5.4.90.0080.03011.72
5.4.80.0050.02411.65
5.4.70.0090.02611.73
5.4.60.0050.02111.65
5.4.50.0040.03111.65
5.4.40.0060.02411.74
5.4.30.0080.02011.66
5.4.20.0040.03111.66
5.4.10.0100.01711.64
5.4.00.0090.02811.39
5.3.290.0040.02212.04
5.3.280.0100.02711.99
5.3.270.0080.02612.00
5.3.260.0090.03512.00
5.3.250.0040.02311.99
5.3.240.0070.02411.99
5.3.230.0070.02411.99
5.3.220.0060.02211.97
5.3.210.0080.02311.98
5.3.200.0090.02211.97
5.3.190.0090.02311.97
5.3.180.0170.07811.97
5.3.170.0090.02611.97
5.3.160.0130.03011.97
5.3.150.0080.03111.97
5.3.140.0110.03111.96
5.3.130.0050.03911.96
5.3.120.0070.03411.96
5.3.110.0080.02811.96
5.3.100.0060.02911.70
5.3.90.0070.03211.69
5.3.80.0070.02911.69
5.3.70.0090.02411.69
5.3.60.0070.02511.68
5.3.50.0110.03211.65
5.3.40.0120.02911.65
5.3.30.0070.03011.63
5.3.20.0060.03011.53
5.3.10.0080.02711.51
5.3.00.0090.02711.50
5.2.170.0080.01810.25
5.2.160.0070.02310.25
5.2.150.0060.02310.25
5.2.140.0090.01810.25
5.2.130.0060.01910.23
5.2.120.0060.02010.23
5.2.110.0080.02010.23
5.2.100.0100.01310.23
5.2.90.0100.02010.23
5.2.80.0070.02310.23
5.2.70.0080.02110.23
5.2.60.0100.02010.21
5.2.50.0060.02410.19
5.2.40.0090.01910.18
5.2.30.0080.02310.17
5.2.20.0060.02110.16
5.2.10.0060.02910.12
5.2.00.0080.02410.05
5.1.60.0030.0159.69
5.1.50.0070.0139.69
5.1.40.0050.0179.68
5.1.30.0040.0299.85
5.1.20.0060.0239.86
5.1.10.0070.0239.73
5.1.00.0040.0289.73
5.0.50.0050.0178.96
5.0.40.0080.0158.90
5.0.30.0060.0198.80
5.0.20.0050.0118.79
5.0.10.0040.0128.78
5.0.00.0040.0188.77
4.4.90.0040.0098.02
4.4.80.0020.0128.01
4.4.70.0020.0128.01
4.4.60.0030.0098.01
4.4.50.0050.0078.02
4.4.40.0060.0127.99
4.4.30.0040.0098.01
4.4.20.0050.0098.06
4.4.10.0020.0118.06
4.4.00.0060.0218.02
4.3.110.0020.0127.97
4.3.100.0010.0127.96
4.3.90.0030.0097.95
4.3.80.0030.0187.93
4.3.70.0030.0127.95
4.3.60.0020.0107.95
4.3.50.0040.0097.95
4.3.40.0010.0187.90
4.3.30.0040.0097.30
4.3.20.0030.0107.29
4.3.10.0010.0127.27
4.3.00.0120.00512.46

preferences:
41.92 ms | 401 KiB | 5 Q