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"; 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.0150.00616.75
8.3.50.0120.00922.01
8.3.40.0180.00019.13
8.3.30.0140.00419.32
8.3.20.0040.00420.59
8.3.10.0110.00423.83
8.3.00.0000.00820.94
8.2.180.0120.00316.75
8.2.170.0090.00922.96
8.2.160.0100.00322.24
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0050.00320.52
8.2.110.0080.00022.29
8.2.100.0080.00318.03
8.2.90.0000.00819.47
8.2.80.0050.00318.05
8.2.70.0080.00017.75
8.2.60.0000.01018.05
8.2.50.0080.00018.07
8.2.40.0070.00018.34
8.2.30.0080.00018.28
8.2.20.0070.00017.84
8.2.10.0050.00318.05
8.2.00.0040.00417.79
8.1.280.0140.00025.92
8.1.270.0030.00623.96
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.95
8.1.230.0040.00719.25
8.1.220.0000.00817.91
8.1.210.0000.00818.77
8.1.200.0090.00017.48
8.1.190.0000.00917.55
8.1.180.0040.00418.10
8.1.170.0000.00918.59
8.1.160.0040.00422.18
8.1.150.0000.00718.77
8.1.140.0030.00617.64
8.1.130.0000.00717.88
8.1.120.0040.00417.66
8.1.110.0000.00817.65
8.1.100.0040.00417.61
8.1.90.0040.00417.63
8.1.80.0030.00317.52
8.1.70.0050.00217.63
8.1.60.0040.00417.68
8.1.50.0090.00017.65
8.1.40.0000.00817.58
8.1.30.0000.00817.61
8.1.20.0040.00417.68
8.1.10.0090.00017.63
8.1.00.0000.00817.60
8.0.300.0030.00618.77
8.0.290.0040.00417.03
8.0.280.0000.00718.54
8.0.270.0000.00717.41
8.0.260.0070.00016.99
8.0.250.0000.00717.17
8.0.240.0040.00417.10
8.0.230.0000.00717.14
8.0.220.0070.00016.96
8.0.210.0000.00817.02
8.0.200.0030.00316.98
8.0.190.0040.00417.03
8.0.180.0000.00916.98
8.0.170.0050.00317.01
8.0.160.0020.00516.98
8.0.150.0000.00817.10
8.0.140.0000.00917.05
8.0.130.0030.00313.54
8.0.120.0000.00817.06
8.0.110.0040.00417.16
8.0.100.0000.00716.90
8.0.90.0080.00017.12
8.0.80.0060.00917.04
8.0.70.0100.00016.94
8.0.60.0040.00417.25
8.0.50.0050.00317.25
8.0.30.0110.01117.44
8.0.20.0170.00617.50
8.0.10.0040.00417.22
8.0.00.0090.00917.13
7.4.330.0020.00215.38
7.4.320.0070.00016.76
7.4.300.0060.00016.75
7.4.290.0030.00316.77
7.4.280.0110.00016.64
7.4.270.0030.00316.81
7.4.260.0030.00316.76
7.4.250.0000.00716.61
7.4.240.0000.00716.87
7.4.230.0000.00816.68
7.4.220.0070.01116.75
7.4.210.0100.00616.81
7.4.200.0040.00416.68
7.4.190.0000.00716.91
7.4.160.0040.01216.69
7.4.150.0120.00817.40
7.4.140.0140.00517.86
7.4.130.0130.00816.83
7.4.120.0050.01316.78
7.4.110.0100.00916.68
7.4.100.0120.00816.77
7.4.90.0150.00516.57
7.4.80.0110.00716.80
7.4.70.0120.01216.88
7.4.60.0110.00616.77
7.4.50.0090.00016.60
7.4.40.0050.00522.77
7.4.30.0150.00616.63
7.4.10.0050.00915.00
7.4.00.0100.00615.19
7.3.330.0000.00513.30
7.3.320.0030.00313.37
7.3.310.0030.00516.58
7.3.300.0000.00716.57
7.3.290.0110.01016.52
7.3.280.0100.00616.45
7.3.270.0070.01117.40
7.3.260.0070.01316.75
7.3.250.0090.01016.49
7.3.240.0060.01216.84
7.3.230.0070.01116.55
7.3.210.0070.01116.71
7.3.200.0080.01419.39
7.3.190.0070.01016.81
7.3.180.0060.01116.56
7.3.170.0120.00916.70
7.3.160.0050.01116.46
7.3.130.0120.00915.22
7.3.120.0090.00915.06
7.3.110.0070.01114.95
7.3.100.0070.01015.14
7.3.90.0110.00714.84
7.3.80.0110.00614.99
7.3.70.0120.00414.80
7.3.60.0100.00614.72
7.3.50.0000.01514.96
7.3.40.0030.00714.93
7.3.30.0040.01115.10
7.3.20.0100.00316.61
7.3.10.0100.00316.63
7.3.00.0060.00916.83
7.2.330.0150.00316.98
7.2.320.0040.01317.02
7.2.310.0090.01516.69
7.2.300.0090.00816.84
7.2.290.0130.00416.74
7.2.260.0110.01115.48
7.2.250.0100.01015.43
7.2.240.0120.00315.02
7.2.230.0130.00315.06
7.2.220.0130.00314.86
7.2.210.0030.01715.42
7.2.200.0040.01115.45
7.2.190.0030.01315.26
7.2.180.0000.01615.29
7.2.170.0030.01015.38
7.2.160.0070.00715.23
7.2.150.0070.00817.03
7.2.140.0120.00317.14
7.2.130.0040.00817.14
7.2.120.0060.00616.84
7.2.110.0070.00317.19
7.2.100.0040.00717.12
7.2.90.0040.01117.19
7.2.80.0030.00717.07
7.2.70.0090.00617.16
7.2.60.0050.00917.16
7.2.50.0060.00317.00
7.2.40.0060.00917.30
7.2.30.0100.00317.32
7.2.20.0030.01017.32
7.2.10.0000.01217.18
7.2.00.0060.00617.10
7.1.330.0130.00015.83
7.1.320.0110.00615.78
7.1.310.0090.00915.89
7.1.300.0060.00915.88
7.1.290.0030.00916.03
7.1.280.0070.00715.83
7.1.270.0000.00915.71
7.1.260.0060.00616.25
7.1.250.0030.00915.90
7.1.240.0030.01215.85
7.1.230.0070.00716.05
7.1.220.0030.00615.98
7.1.210.0070.00716.12
7.1.200.0030.00716.00
7.1.190.0060.01015.79
7.1.180.0090.00015.96
7.1.170.0060.00616.14
7.1.160.0150.00016.02
7.1.150.0040.00816.17
7.1.140.0120.00316.10
7.1.130.0090.00616.15
7.1.120.0060.00615.96
7.1.110.0000.00916.11
7.1.100.0110.00415.99
7.1.90.0140.00015.97
7.1.80.0030.01316.03
7.1.70.0090.00216.60
7.1.60.0060.01317.58
7.1.50.0070.00416.66
7.1.40.0040.01115.74
7.1.30.0070.00715.92
7.1.20.0060.00915.83
7.1.10.0060.00915.95
7.1.00.0050.04019.13
7.0.330.0060.00615.36
7.0.320.0060.00615.41
7.0.310.0080.00515.59
7.0.300.0030.00915.43
7.0.290.0060.00615.64
7.0.280.0000.01415.72
7.0.270.0080.00415.61
7.0.260.0070.00315.60
7.0.250.0040.00715.82
7.0.240.0070.00415.63
7.0.230.0000.01415.57
7.0.220.0050.01015.63
7.0.210.0000.01615.80
7.0.200.0060.00516.13
7.0.190.0080.00415.68
7.0.180.0050.00315.64
7.0.170.0070.00315.46
7.0.160.0110.00415.76
7.0.150.0060.00915.45
7.0.140.0040.03819.06
7.0.130.0000.01415.55
7.0.120.0080.00015.63
7.0.110.0000.01315.67
7.0.100.0000.00915.41
7.0.90.0000.01315.52
7.0.80.0040.00415.53
7.0.70.0000.01215.36
7.0.60.0080.04217.75
7.0.50.0070.02816.78
7.0.40.0050.02416.89
7.0.30.0300.04016.89
7.0.20.0150.04316.89
7.0.10.0080.02216.94
7.0.00.0050.02316.86
5.6.400.0080.00614.66
5.6.390.0040.00814.65
5.6.380.0050.00514.72
5.6.370.0090.00615.00
5.6.360.0000.00914.52
5.6.350.0040.00714.43
5.6.340.0000.00914.80
5.6.330.0030.00614.60
5.6.320.0040.01414.70
5.6.310.0070.00814.31
5.6.300.0030.00914.84
5.6.290.0060.00314.57
5.6.280.0070.04018.01
5.6.270.0060.00614.75
5.6.260.0000.00914.79
5.6.250.0030.00714.69
5.6.240.0070.00714.61
5.6.230.0030.00514.68
5.6.220.0030.01014.54
5.6.210.0110.04017.73
5.6.200.0100.04016.48
5.6.190.0100.04217.42
5.6.180.0180.02017.46
5.6.170.0230.04017.66
5.6.160.0090.02517.49
5.6.150.0090.02316.42
5.6.140.0000.02816.55
5.6.130.0030.03116.36
5.6.120.0100.03817.69
5.6.110.0100.04217.89
5.6.100.0030.04517.91
5.6.90.0080.03017.82
5.6.80.0050.04217.32
5.6.70.0030.01014.45
5.6.60.0040.01114.41
5.6.50.0030.01014.73
5.6.40.0070.00714.48
5.6.30.0090.00614.49
5.6.20.0060.01014.30
5.6.10.0030.01014.21
5.6.00.0050.00314.52
5.5.380.0080.00614.19
5.5.370.0060.00614.47
5.5.360.0000.01014.50
5.5.350.0050.03017.53
5.5.340.0100.03716.29
5.5.330.0110.03217.45
5.5.320.0150.02317.61
5.5.310.0180.03817.55
5.5.300.0080.02616.24
5.5.290.0140.03716.27
5.5.280.0070.02217.90
5.5.270.0080.02717.72
5.5.260.0100.02517.65
5.5.250.0150.03617.55
5.5.240.2180.02517.29
5.5.230.0060.01014.21
5.5.220.0090.00614.30
5.5.210.0060.00914.52
5.5.200.0060.00614.44
5.5.190.0000.00914.46
5.5.180.0060.00314.22
5.5.170.0040.00414.26
5.5.160.0070.00714.46
5.5.150.0030.00914.25
5.5.140.0030.01214.68
5.5.130.0000.01014.33
5.5.120.0070.00714.34
5.5.110.0040.00414.33
5.5.100.0040.01113.97
5.5.90.0110.00314.32
5.5.80.0110.00714.54
5.5.70.0050.00514.43
5.5.60.0040.01114.16
5.5.50.0040.01114.52
5.5.40.0060.00614.63
5.5.30.0030.00714.50
5.5.20.0030.00614.16
5.5.10.0000.01114.21
5.5.00.0080.00814.31
5.4.450.0470.02115.93
5.4.440.0320.03515.99
5.4.430.0100.03116.10
5.4.420.0160.03215.92
5.4.410.0350.03815.80
5.4.400.0300.03015.72
5.4.390.0280.03215.55
5.4.380.0070.03115.57
5.4.370.0140.02415.68
5.4.360.0170.02515.69
5.4.350.0050.03715.72
5.4.340.0110.02815.72
5.4.330.0070.00312.57
5.4.320.0040.02112.56
5.4.310.0050.02112.56
5.4.300.0090.01912.56
5.4.290.0080.02112.56
5.4.280.0060.03212.49
5.4.270.0100.02812.49
5.4.260.0060.03112.49
5.4.250.0100.02912.49
5.4.240.0090.02812.49
5.4.230.0030.03712.49
5.4.220.0050.03412.49
5.4.210.0090.03012.49
5.4.200.0080.03312.49
5.4.190.0070.03112.48
5.4.180.0080.03012.48
5.4.170.0060.03312.49
5.4.160.0050.02712.49
5.4.150.0060.03112.49
5.4.140.0100.02712.33
5.4.130.0030.02212.32
5.4.120.0080.02212.30
5.4.110.0090.02912.30
5.4.100.0070.02612.30
5.4.90.0070.02312.30
5.4.80.0050.03312.30
5.4.70.0060.02712.30
5.4.60.0090.02412.30
5.4.50.0080.02912.30
5.4.40.0070.02512.29
5.4.30.0030.02312.29
5.4.20.0060.02212.29
5.4.10.0080.02212.29
5.4.00.0070.02512.04
5.3.290.0060.02812.69
5.3.280.0020.03212.64
5.3.270.0120.01912.65
5.3.260.0080.02012.64
5.3.250.0050.02412.64
5.3.240.0050.02312.64
5.3.230.0020.02812.64
5.3.220.0080.02712.63
5.3.210.0050.03112.62
5.3.200.0070.02612.62
5.3.190.0110.02912.62
5.3.180.0070.03212.62
5.3.170.0060.03112.62
5.3.160.0080.02912.62
5.3.150.0060.03212.62
5.3.140.0040.03212.62
5.3.130.0080.02812.61
5.3.120.0060.03112.61
5.3.110.0070.03112.61
5.3.100.0090.02512.35
5.3.90.0070.02712.34
5.3.80.0040.02812.34
5.3.70.0110.02412.33
5.3.60.0100.02412.33
5.3.50.0100.02412.30
5.3.40.0040.02312.30
5.3.30.0060.02612.28
5.3.20.0050.02812.18
5.3.10.0070.02812.15
5.3.00.0030.03112.15
5.2.170.0050.0449.23
5.2.160.0050.0419.23
5.2.150.0100.0389.23
5.2.140.0120.0389.23
5.2.130.0100.0429.18
5.2.120.0060.0399.18
5.2.110.0040.0429.19
5.2.100.0070.0429.19
5.2.90.0070.0419.19
5.2.80.0080.0429.19
5.2.70.0110.0409.19
5.2.60.0060.0429.14
5.2.50.0090.0399.11
5.2.40.0050.0409.08
5.2.30.0100.0399.07
5.2.20.0050.0419.05
5.2.10.0070.0588.96
5.2.00.0090.0428.82
5.1.60.0060.0358.11
5.1.50.0080.0338.11
5.1.40.0050.0358.09
5.1.30.0060.0378.43
5.1.20.0070.0368.46
5.1.10.0070.0338.18
5.1.00.0050.0388.19
5.0.50.0050.0286.66
5.0.40.0040.0296.53
5.0.30.0070.0446.33
5.0.20.0060.0376.30
5.0.10.0060.0266.28
5.0.00.0040.0396.27
4.4.90.0010.0254.78
4.4.80.0050.0204.76
4.4.70.0020.0224.75
4.4.60.0020.0224.76
4.4.50.0010.0244.77
4.4.40.0020.0354.70
4.4.30.0030.0214.76
4.4.20.0040.0214.84
4.4.10.0040.0214.85
4.4.00.0050.0304.76
4.3.110.0060.0204.67
4.3.100.0050.0194.66
4.3.90.0030.0214.64
4.3.80.0040.0314.58
4.3.70.0030.0214.63
4.3.60.0040.0204.63
4.3.50.0050.0204.63
4.3.40.0010.0344.54
4.3.30.0040.0203.33
4.3.20.0030.0213.31
4.3.10.0010.0233.27
4.3.00.0200.01315.48

preferences:
63.02 ms | 401 KiB | 5 Q