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); public static 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)
5.4.280.0080.05612.36
5.4.270.0050.05812.36
5.4.260.0070.06012.36
5.4.250.0050.06212.36
5.4.240.0090.05712.36
5.4.230.0090.05812.36
5.4.220.0090.05612.36
5.4.210.0070.05712.36
5.4.200.0090.05612.35
5.4.190.0090.05412.35
5.4.180.0080.05812.35
5.4.170.0080.05312.36
5.4.160.0080.05112.36
5.4.150.0090.05212.35
5.4.140.0100.06512.04
5.4.130.0120.05912.02
5.4.120.0150.07011.98
5.4.110.0060.05511.98
5.4.100.0090.04911.98
5.4.90.0080.05411.98
5.4.80.0090.05011.98
5.4.70.0070.05111.98
5.4.60.0080.05011.98
5.4.50.0090.05311.98
5.4.40.0110.06511.96
5.4.30.0110.04811.97
5.4.20.0050.05311.96
5.4.10.0090.04911.96
5.4.00.0070.05211.45
5.3.280.0090.05112.71
5.3.270.0070.05112.72
5.3.260.0030.04512.72
5.3.250.0060.04412.72
5.3.240.0100.05612.72
5.3.230.0150.05112.71
5.3.220.0070.05612.68
5.3.210.0090.05612.68
5.3.200.0050.05512.68
5.3.190.0050.05212.68
5.3.180.0100.06812.67
5.3.170.0100.04412.66
5.3.160.0060.05212.67
5.3.150.0080.05512.68
5.3.140.0140.05012.66
5.3.130.0120.05412.66
5.3.120.0160.05212.65
5.3.110.0100.05512.65
5.3.100.0090.05512.12
5.3.90.0140.06912.08
5.3.80.0080.05812.07
5.3.70.0060.06112.07
5.3.60.0170.05712.06
5.3.50.0110.05512.00
5.3.40.0060.05312.00
5.3.30.0080.06411.93
5.3.20.0150.06211.71
5.3.10.0090.05111.67
5.3.00.0100.06311.66

preferences:
140.3 ms | 1394 KiB | 7 Q