3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Welcome to PhpCodePad ....'; function getAffValue($site){ if (stripos($site, "flipkart") != FALSE) return "infoclipri"; if (stripos($site, "infibeam") != FALSE) return "clip"; if (stripos($site, "healthkart") != FALSE) return "CliprL3C2ATRJ1P"; return "clipr"; } function getAffParam($site){ if (stripos($site, "flipkart") != FALSE) return "affid"; if (stripos($site, "infibeam") != FALSE) return "trackId"; if (stripos($site, "healthkart") != FALSE) return "affid"; return "referrer"; } function urlFromParsedUrl($parsedurl){ return $parsedurl['scheme']."://".$parsedurl['host']."".$parsedurl['path']."?".$parsedurl['query']; } function affiliatize($link){ $parsedurl['host'] = ""; $parsedurl['path'] = ""; $parsedurl = parse_url($link); if($parsedurl === false)die('Malformed url'); $site = $parsedurl['host']; if(isset($parsedurl['query'])) $query = $parsedurl['query']; else $query = ""; $querylist = explode('&',$query); $queryarray = array(); if($query != ""){ foreach ($querylist as $elem) { $param = explode('=',$elem); $queryarray[$param[0]] = $param[1]; } } $queryarray[getAffParam($site)] = getAffValue($site); $parsedurl['query'] = http_build_query($queryarray); return urlFromParsedUrl($parsedurl); } echo affiliatize("https://itsourstudio.com/ProductDescription.php?cat=Party&pid=286");

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.00716.38
8.3.50.0240.00917.25
8.3.40.0090.00618.72
8.3.30.0120.00618.79
8.3.20.0030.00618.72
8.3.10.0090.00020.58
8.3.00.0080.00019.50
8.2.180.0140.00716.63
8.2.170.0070.00722.96
8.2.160.0110.00420.69
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00320.99
8.2.110.0060.00320.44
8.2.100.0090.00317.85
8.2.90.0030.00518.03
8.2.80.0000.00919.28
8.2.70.0050.00317.75
8.2.60.0030.00618.04
8.2.50.0030.00618.07
8.2.40.0050.00318.22
8.2.30.0050.00218.03
8.2.20.0120.00017.77
8.2.10.0000.00817.79
8.2.00.0000.01017.80
8.1.280.0040.01125.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0040.00422.19
8.1.230.0120.00020.96
8.1.220.0000.00817.74
8.1.210.0030.00618.98
8.1.200.0000.00917.47
8.1.190.0030.00517.53
8.1.180.0000.00818.10
8.1.170.0040.00418.84
8.1.160.0090.00018.97
8.1.150.0050.00318.57
8.1.140.0030.00517.49
8.1.130.0000.00717.71
8.1.120.0070.00017.41
8.1.110.0030.00517.37
8.1.100.0070.00017.47
8.1.90.0000.00817.38
8.1.80.0080.00017.43
8.1.70.0030.00317.50
8.1.60.0070.00317.49
8.1.50.0000.00817.48
8.1.40.0040.00417.55
8.1.30.0040.00417.68
8.1.20.0100.00017.72
8.1.10.0030.00617.44
8.1.00.0030.00617.39
8.0.300.0050.00220.14
8.0.290.0040.00416.63
8.0.280.0030.00318.48
8.0.270.0000.00717.29
8.0.260.0040.00416.83
8.0.250.0040.00417.01
8.0.240.0080.00016.99
8.0.230.0040.00416.99
8.0.220.0050.00216.93
8.0.210.0030.00316.91
8.0.200.0000.00616.89
8.0.190.0000.00816.96
8.0.180.0040.00417.00
8.0.170.0050.00316.74
8.0.160.0050.00216.98
8.0.150.0050.00516.84
8.0.140.0000.00816.87
8.0.130.0000.00513.36
8.0.120.0000.00716.88
8.0.110.0000.00716.79
8.0.100.0040.00416.95
8.0.90.0070.00017.03
8.0.80.0070.01016.98
8.0.70.0000.00716.92
8.0.60.0030.00316.87
8.0.50.0000.00716.93
8.0.30.0140.00316.83
8.0.20.0140.00716.92
8.0.10.0040.00416.89
8.0.00.0080.01216.64
7.4.330.0030.00313.01
7.4.320.0030.00316.65
7.4.300.0060.00016.55
7.4.290.0070.00016.54
7.4.280.0000.01116.54
7.4.270.0070.00016.57
7.4.260.0060.00013.30
7.4.250.0000.00816.54
7.4.240.0050.00316.55
7.4.230.0080.00016.70
7.4.220.0140.00316.72
7.4.210.0000.01516.56
7.4.200.0000.00816.34
7.4.190.0070.00016.80
7.4.160.0070.01816.50
7.4.150.0100.00716.47
7.4.140.0120.01216.52
7.4.130.0090.00816.46
7.4.120.0040.01316.54
7.4.110.0170.00016.55
7.4.100.0110.00616.63
7.4.90.0090.00916.55
7.4.80.0040.01419.39
7.4.70.0090.00616.48
7.4.60.0060.00916.43
7.4.50.0040.00416.48
7.4.40.0030.01016.45
7.4.30.0070.01016.38
7.4.00.0040.01115.00
7.3.330.0000.00613.13
7.3.320.0050.00013.22
7.3.310.0000.00716.38
7.3.300.0000.00716.34
7.3.290.0070.00916.39
7.3.280.0070.01016.36
7.3.270.0180.00316.38
7.3.260.0100.00716.51
7.3.250.0090.00816.53
7.3.240.0060.00916.30
7.3.230.0130.00416.29
7.3.210.0110.00716.54
7.3.200.0130.00316.64
7.3.190.0150.00716.30
7.3.180.0110.00516.52
7.3.170.0080.00816.50
7.3.160.0050.01316.41
7.3.120.0060.00614.77
7.3.10.0140.00616.14
7.3.00.0140.00316.26
7.2.330.0160.00316.88
7.2.320.0150.00616.73
7.2.310.0130.00416.61
7.2.300.0040.01516.82
7.2.290.0070.01316.86
7.2.130.0110.01116.60
7.2.120.0130.00016.57
7.2.110.0160.00616.53
7.2.100.0150.00616.32
7.2.90.0280.00316.74
7.2.80.0060.00616.71
7.2.70.0150.00516.36
7.2.60.0070.01416.41
7.2.50.0150.01116.47
7.2.40.0140.00416.41
7.2.30.0150.00416.74
7.2.20.0160.00616.63
7.2.10.0140.00516.70
7.2.00.0090.00918.21
7.1.250.0200.00015.60
7.1.100.0080.00318.29
7.1.70.0030.00917.27
7.1.60.0040.01219.30
7.1.50.0060.01617.04
7.1.00.0100.06722.42
7.0.200.0060.00316.93
7.0.140.0000.07722.15
7.0.120.0030.07322.18
7.0.60.0230.06719.81
7.0.50.0170.08017.98
7.0.40.0130.06020.09
7.0.30.0430.04320.06
7.0.20.0170.04320.07
7.0.10.0300.04720.06
7.0.00.0070.08720.20
5.6.280.0100.06721.00
5.6.210.0030.04020.46
5.6.200.0100.04018.26
5.6.190.0100.06720.57
5.6.180.0400.07020.45
5.6.170.0530.06320.39
5.6.160.0070.09020.46
5.6.150.0070.04718.17
5.6.140.0030.08718.13
5.6.130.0000.04318.16
5.6.120.0070.05721.13
5.6.110.0170.08021.02
5.6.100.0070.08021.13
5.6.90.0030.04321.03
5.6.80.0170.07320.39
5.6.70.0130.03720.38
5.5.350.0370.06720.34
5.5.340.0030.06017.98
5.5.330.0000.07320.29
5.5.320.0370.07020.27
5.5.310.0270.04320.30
5.5.300.0100.03317.98
5.5.290.0070.06318.07
5.5.280.0070.08020.66
5.5.270.0200.07320.75
5.5.260.0030.06720.77
5.5.250.0100.07720.48
5.5.240.0000.09020.16
5.4.450.0070.04019.57
5.4.440.0100.07719.59
5.4.430.0100.04319.48
5.4.420.0130.05319.13
5.4.410.0030.04319.44
5.4.400.0030.04019.16
5.4.390.0130.06319.24
5.4.380.0070.08019.17
5.4.370.0100.07718.85
5.4.360.0070.06719.24
5.4.350.0000.04719.15
5.4.340.0000.04719.22
5.4.320.0030.04018.87
5.4.310.0030.03719.12
5.4.300.0100.03719.14
5.4.290.0000.04719.00
5.4.280.0000.04019.14
5.4.270.0030.03719.05
5.4.260.0030.03719.14
5.4.250.0070.03318.84
5.4.240.0070.03319.00
5.4.230.0070.03319.16
5.4.220.0130.03719.11
5.4.210.0000.04019.17
5.4.200.0070.03319.14
5.4.190.0070.03319.07
5.4.180.0070.03319.14
5.4.170.0000.04019.23
5.4.160.0030.03719.14
5.4.150.0100.03019.10
5.4.140.0030.03316.60
5.4.130.0030.03316.42
5.4.120.0030.03716.36
5.4.110.0000.04316.48
5.4.100.0100.03316.54
5.4.90.0030.03316.45
5.4.80.0030.03716.50
5.4.70.0000.03716.49
5.4.60.0000.03716.27
5.4.50.0000.03716.43
5.4.40.0000.03716.46
5.4.30.0030.05716.36
5.4.20.0100.06016.44
5.4.10.0030.04316.40
5.4.00.0000.04715.82
5.3.290.0030.04014.77
5.3.280.0000.04014.62
5.3.270.0070.03714.61
5.3.260.0030.03714.66
5.3.250.0070.04014.65
5.3.240.0000.04314.70
5.3.230.0000.04714.76
5.3.220.0070.03314.46
5.3.210.0070.03314.64
5.3.200.0000.03714.61
5.3.190.0000.04014.61
5.3.180.0030.04014.58
5.3.170.0000.04314.61
5.3.160.0100.03014.58
5.3.150.0070.03314.63
5.3.140.0100.02714.57
5.3.130.0070.03314.48
5.3.120.0070.05714.57
5.3.110.0130.07714.56
5.3.100.0070.05714.07
5.3.90.0030.05714.04
5.3.80.0100.06714.03
5.3.70.0070.07314.08
5.3.60.0200.05314.16
5.3.50.0100.04713.98
5.3.40.0130.06014.12
5.3.30.0070.06013.89
5.3.20.0070.07013.78
5.3.10.0030.07313.72
5.3.00.0070.04713.67
5.2.170.0030.05311.24
5.2.160.0100.05011.30
5.2.150.0000.05011.11
5.2.140.0070.03011.21
5.2.130.0030.06711.11
5.2.120.0070.06011.17
5.2.110.0070.05711.08
5.2.100.0070.04311.01
5.2.90.0070.05011.17
5.2.80.0000.03711.18
5.2.70.0030.03011.14
5.2.60.0100.04011.22
5.2.50.0070.05711.10
5.2.40.0170.04710.96
5.2.30.0030.05710.96
5.2.20.0030.06310.98
5.2.10.0100.05010.93
5.2.00.0030.06310.73
5.1.60.0070.0479.92
5.1.50.0030.0579.91
5.1.40.0030.04710.01
5.1.30.0100.04310.35
5.1.20.0000.04010.26
5.1.10.0030.05310.05
5.1.00.0030.05010.08
5.0.50.0000.0279.31
5.0.40.0000.0509.31
5.0.30.0030.0709.31
5.0.20.0030.0279.31
5.0.10.0100.0379.31
5.0.00.0000.0709.31
4.4.90.0000.0379.31
4.4.80.0030.0279.31
4.4.70.0030.0339.31
4.4.60.0000.0339.31
4.4.50.0030.0339.31
4.4.40.0030.0539.31
4.4.30.0070.0309.31
4.4.20.0070.0309.31
4.4.10.0000.0379.31
4.4.00.0030.0579.31
4.3.110.0000.0379.31
4.3.100.0100.0109.31
4.3.90.0070.0209.31
4.3.80.0030.0539.31
4.3.70.0000.0379.31
4.3.60.0030.0339.31
4.3.50.0030.0339.31
4.3.40.0030.0539.31
4.3.30.0000.0279.31
4.3.20.0000.0209.31
4.3.10.0000.0309.31
4.3.00.0030.0309.31

preferences:
48.86 ms | 401 KiB | 5 Q