3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://api.tivi8k.net/viettel/?cid=160&token=P6cf0Swsh62FKd773_q_Cg&e=1499794112'; $parse = parse_url($url); print_r($parse); function unparse_url($parsed_url) { $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : ''; $pass = ($user || $pass) ? "$pass@" : ''; $path = isset($parsed_url['path']) ? $parsed_url['path'] : ''; $query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : ''; $fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : ''; return "$scheme$user$pass$host$port$path$query$fragment"; } $c = 'go'; if (isset($parse['host']) && preg_match('/.*?\.tivi8k\.net/', $parse['host'])) { if (isset($parse['path']) && substr_count($parse['path'], '/') === 2) { $parse['path'] = '/ffff/'; parse_str($parse['query'], $params); if (isset($params['token']) && isset($params['e'])) { $a = array( 'id', 'cid', 'channel' ); foreach ($a as $b) { if(isset($params[$b])) { unset($params[$b]); $params[$c]='ddd'; echo $_GET['bb']; } } $params['token'] = 'hello'; $parse['query'] = http_build_query($params); } } } print_r(unparse_url($parse)); ?>

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.01116.88
8.3.50.0110.00416.77
8.3.40.0150.00019.05
8.3.30.0110.00419.09
8.3.20.0050.00220.30
8.3.10.0060.00321.74
8.3.00.0000.00722.09
8.2.180.0090.00618.56
8.2.170.0040.01122.96
8.2.160.0110.00419.26
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00420.98
8.2.120.0000.01426.35
8.2.110.0070.00322.24
8.2.100.0060.00618.03
8.2.90.0050.00319.30
8.2.80.0030.00618.04
8.2.70.0000.00917.88
8.2.60.0000.00818.04
8.2.50.0030.00618.10
8.2.40.0000.00820.59
8.2.30.0050.00321.17
8.2.20.0000.00718.04
8.2.10.0000.00718.04
8.2.00.0030.00518.13
8.1.280.0040.01125.92
8.1.270.0040.00422.04
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0060.00323.80
8.1.230.0070.00417.77
8.1.220.0000.00817.79
8.1.210.0040.00818.77
8.1.200.0040.00417.48
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00319.03
8.1.160.0000.00719.01
8.1.150.0080.00018.81
8.1.140.0040.00419.67
8.1.130.0000.00718.89
8.1.120.0060.00317.59
8.1.110.0040.00417.64
8.1.100.0090.00017.66
8.1.90.0030.00717.62
8.1.80.0000.00717.58
8.1.70.0000.00717.52
8.1.60.0040.00417.77
8.1.50.0000.00817.71
8.1.40.0030.00717.60
8.1.30.0030.00517.83
8.1.20.0080.00017.75
8.1.10.0030.00617.64
8.1.00.0000.00817.66
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0040.00418.50
8.0.270.0040.00417.17
8.0.260.0070.00017.10
8.0.250.0030.00317.23
8.0.240.0050.00317.16
8.0.230.0000.00717.09
8.0.220.0030.00317.07
8.0.210.0000.00717.12
8.0.200.0030.00317.21
8.0.190.0060.00317.21
8.0.180.0000.00717.05
8.0.170.0030.00317.15
8.0.160.0040.00416.99
8.0.150.0000.00717.02
8.0.140.0040.00417.09
8.0.130.0030.00313.54
8.0.120.0040.00417.09
8.0.110.0040.00417.00
8.0.100.0040.00416.96
8.0.90.0040.00417.16
8.0.80.0080.00817.00
8.0.70.0080.00017.08
8.0.60.0000.00817.12
8.0.50.0000.00717.11
8.0.30.0050.01117.32
8.0.20.0090.01017.48
8.0.10.0040.00417.30
8.0.00.0120.00616.95
7.4.330.0050.00015.55
7.4.320.0030.00316.83
7.4.300.0030.00316.86
7.4.290.0080.00016.74
7.4.280.0050.00316.82
7.4.270.0000.00716.69
7.4.260.0050.00316.72
7.4.250.0030.00316.61
7.4.240.0040.00416.84
7.4.230.0000.00716.88
7.4.220.0090.00916.83
7.4.210.0070.00916.71
7.4.200.0070.00016.68
7.4.160.0100.01216.77
7.4.150.0140.00717.40
7.4.140.0070.01017.86
7.4.130.0150.00316.95
7.4.120.0100.00716.75
7.4.110.0100.00716.61
7.4.100.0140.00816.61
7.4.90.0070.01016.75
7.4.80.0070.01119.39
7.4.70.0030.01416.76
7.4.60.0120.00916.93
7.4.50.0040.01116.60
7.4.40.0140.00516.88
7.4.30.0100.01316.63
7.4.00.0070.01115.04
7.3.330.0030.00313.59
7.3.320.0000.00613.51
7.3.310.0070.00016.60
7.3.300.0070.00016.56
7.3.290.0040.00416.55
7.3.280.0080.01016.57
7.3.270.0040.01517.40
7.3.260.0080.00916.70
7.3.250.0100.00716.66
7.3.240.0100.00716.61
7.3.230.0070.01016.59
7.3.210.0130.00916.74
7.3.200.0120.00616.53
7.3.190.0060.01016.87
7.3.180.0120.00416.51
7.3.170.0100.00716.57
7.3.160.0030.01416.84
7.3.120.0070.01314.87
7.3.110.0090.00915.00
7.3.100.0100.00715.15
7.3.90.0070.01115.27
7.3.80.0060.00615.00
7.3.70.0090.00614.98
7.3.60.0080.00814.92
7.3.50.0040.01414.92
7.3.40.0110.00715.13
7.3.30.0070.00715.13
7.3.20.0060.00916.88
7.3.10.0000.01316.89
7.3.00.0130.00316.93
7.2.330.0110.00616.79
7.2.320.0070.01716.97
7.2.310.0100.00916.88
7.2.300.0070.01116.73
7.2.290.0100.01416.75
7.2.250.0080.00915.45
7.2.240.0100.01015.38
7.2.230.0030.00715.23
7.2.220.0000.01015.13
7.2.210.0000.01115.17
7.2.200.0070.00715.41
7.2.190.0000.01015.21
7.2.180.0060.00915.19
7.2.170.0000.01715.41
7.2.90.0170.00315.25
7.2.80.0720.01014.95
7.2.70.0610.02015.57
7.2.60.0070.01415.02
7.2.50.0160.00615.19
7.2.40.0780.00815.31
7.2.30.1240.01315.29
7.2.20.0810.01315.27
7.2.10.0970.01015.35
7.2.00.1130.00715.28
7.1.330.0030.01016.07
7.1.320.0040.00415.95
7.1.310.0040.01116.11
7.1.300.0040.00716.20
7.1.290.0060.00916.09
7.1.280.0100.00716.04
7.1.270.0030.01015.87
7.1.260.0100.00716.00
7.1.210.0770.00314.22
7.1.200.0280.00614.30
7.1.190.0670.00714.04
7.1.180.0370.01314.25
7.1.170.0580.00714.24
7.1.160.1150.01013.92
7.1.150.1140.01013.73
7.1.140.0990.00714.20
7.1.130.0860.00514.06
7.1.120.0840.00313.83
7.1.110.1360.00614.13
7.1.100.0810.00713.83
7.1.90.0880.00313.91
7.1.80.1180.01014.09
7.1.70.1360.00314.33
7.1.60.0360.01031.98
7.1.50.0330.00732.08
7.1.40.0820.00632.24
7.1.30.0330.00432.27
7.1.20.0890.01032.14
7.1.10.0570.00314.00
7.1.00.1260.00614.23
7.0.310.0870.01014.01
7.0.300.0160.00813.43
7.0.290.1940.00313.80
7.0.280.0930.01013.66
7.0.270.1170.00613.88
7.0.260.0210.00913.82
7.0.250.0630.00613.91
7.0.240.0750.00713.91
7.0.230.0860.00713.90
7.0.220.0180.00613.91
7.0.210.0650.00313.90
7.0.200.0960.01113.50
7.0.190.1100.00913.60
7.0.180.0340.00913.80
7.0.170.0060.00713.79
7.0.160.0950.00313.86
7.0.150.0220.00613.75
7.0.140.0520.00313.83
7.0.130.0030.01413.86
7.0.120.0150.00313.89
7.0.110.0210.00313.66
7.0.100.1310.00313.63
7.0.90.1500.01013.74
7.0.80.0880.00713.96
7.0.70.0950.01013.66
7.0.60.0750.01013.80
7.0.50.1040.00014.00
7.0.40.0990.00913.84
7.0.30.1420.01014.04
7.0.20.0910.01214.10
7.0.10.1670.01213.93
7.0.00.1780.00313.86

preferences:
37.95 ms | 401 KiB | 5 Q