3v4l.org

run code in 300+ PHP versions simultaneously
<?php /************************************************************************** * Adiquity Ad Code - Adiquity.com * Copyright Adiquity Technologies Pvt Ltd . All rights reserved. * Language: PHP (Curl) * Version: 18072011 **************************************************************************/ $Adq_COOKIE = "adq_site_cookie"; //Set user cookie setUserCookie(); function adiquity_ad($adq_params) { global $Adq_COOKIE; $proxies = array( '104.154.42.169', // United States '66.143.181.26', '198.11.172.39', '199.168.148.151', '207.5.112.114', '199.168.148.151', '199.168.148.147', '104.129.194.103', '192.95.23.4', '66.85.148.52' ); $proxy = $proxies[array_rand($proxies)]; $useragents = array( "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.2342 Mobile Safari/537.10+", "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Mobile Safari/535.19 Silk-Accelerated=true", "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/525.10 (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2", "Mozilla/5.0 (Linux; Android 4.3; SPH-L710 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36", "Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (Linux; Android 4.4.4; Nexus 7 Build/KTU84P) AppleWebKit/537.36 (KHTML like Gecko) Chrome/36.0.1985.135 Safari/537.36", "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53", "Mozilla/5.0 (Linux; Android 4.1.2; SHV-E250S Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; SAMSUNG-SM-T537A Build/KOT49H) AppleWebKit/537.36 (KHTML like Gecko) Chrome/35.0.1916.141 Safari/537.36", "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)", "Mozilla/5.0 (Android 4.2; rv:19.0) Gecko/20121129 Firefox/19.0", "Opera/9.80 (Android 4.0.4; Linux; Opera Mobi/ADR-1205181138; U; pl) Presto/2.10.254 Version/12.00", "Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/BuildID) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36", "Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/525.10 (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2", "Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.0.3; de-de; Galaxy S II Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Opera/9.80 (Android 4.0.4; Linux; Opera Mobi/ADR-1205181138; U; pl) Presto/2.10.254 Version/12.00", "Mozilla/5.0 (Android; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1", "Mozilla/5.0 (Linux; Android 4.1.2; SHV-E250S Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Mobile Safari/537.36", "Mozilla/5.0 (Android 4.2; rv:19.0) Gecko/20121129 Firefox/19.0", "Mozilla/5.0 (Linux; U; Android 4.3; en-us; sdk Build/MR1) AppleWebKit/536.23 (KHTML, like Gecko) Version/4.3 Mobile Safari/536.23", "Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/BuildID) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; SAMSUNG-SM-T537A Build/KOT49H) AppleWebKit/537.36 (KHTML like Gecko) Chrome/35.0.1916.141 Safari/537.36", "Mozilla/5.0 (Linux; Android 4.4.2; en-au; SAMSUNG SM-G900I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6" ); $useragent = $useragents[array_rand($useragents)]; $gender = ''; $age = ''; $longitude = ''; $latitude = ''; $location = ''; if(! empty($longitude) && ! empty($latitude)) { $location=$latitude.",".$longitude; } $ext_user_id = getadqCookie(); //$proxy = $_SERVER["REMOTE_ADDR"]; //$useragent = $_SERVER["HTTP_USER_AGENT"]; $params = array(); $params = array( 'ua=' => urlencode($useragent), 'TIP=' => urlencode($proxy), 'aclang=' => 'php', 'acver=" => "18072011', 'cat' => 's1,en', 'REQUEST_METHOD' => urlencode($_SERVER['REQUEST_METHOD']), //Returns the request method used to access the page (such as POST) 'REQUEST_TIME' => urlencode($_SERVER['REQUEST_TIME']), //Returns the timestamp of the start of the request (such as 1377687496) 'REQUEST_TIME_FLOAT' => urlencode($_SERVER['REQUEST_TIME_FLOAT']), //The timestamp of the start of the request, with microsecond precision. 'REQUEST_URI' => urlencode($_SERVER['REQUEST_URI']), // 'HTTP_ACCEPT' => urlencode($_SERVER['HTTP_ACCEPT']), //Returns the Accept header from the current request 'HTTP_ACCEPT_CHARSET' => urlencode($_SERVER['HTTP_ACCEPT_CHARSET']), //Returns the Accept_Charset header from the current request (such as utf-8,ISO-8859-1) 'HTTP_ACCEPT_ENCODING' => urlencode($_SERVER['HTTP_ACCEPT_ENCODING']), //Contents of the Accept-Encoding: header from the current request, if there is one. Example: 'gzip'. 'HTTP_ACCEPT_LANGUAGE' => urlencode($_SERVER['HTTP_ACCEPT_LANGUAGE']), //Contents of the Accept-Language: header from the current request, if there is one. Example: 'en'. 'HTTP_DNT' => urlencode($_SERVER['HTTP_DNT']), // 'HTTP_HOST' => urlencode($_SERVER['HTTP_HOST']), //Returns the Host header from the current request 'HTTP_REFERER' => urlencode($_SERVER['HTTP_REFERER']), //Returns the complete URL of the current page (not reliable because not all user-agents support it) 'HTTP_USER_AGENT' => urlencode($useragent) //Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page ); if (!empty($adq_params["ADQ_PARAMS"])){ foreach ($adq_params["ADQ_PARAMS"] as $key => $value){ $params[] = urlencode($key) . "=" . urlencode($value); } } /* foreach ($_SERVER as $key => $value) { if ((substr($key, 0, 4) == "HTTP") ||(substr($key, 0, 3) == "REQ")) { $params[] = $key . "=" . urlencode($value); } } */ $post = implode("&", $params); $extras ="&gender=".$gender."&age=".$age."&location=".$location; if($ext_user_id != null) { $extras .= "&ext_user_id=".$ext_user_id; } $post .= $extras; $request = curl_init(); $request_timeout = 10; // 10 seconds timeout print_r($post); $adq_url = "http://ads.adiquity.com/mads"; curl_setopt_array($request, array( CURLOPT_URL => $adq_url, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_TIMEOUT => $request_timeout, CURLOPT_HTTPHEADER => array( "Content-Type: application/x-www-form-urlencoded", "Connection: Close", "X-ADQ-pazid: adqnq5kk-14zlpzeo-vvc88"), URLOPT_POSTFIELDS, $post ) ); $contents = curl_exec($request); echo "proxy:\n\n". $proxy ."\r\n\n||\n\n"; echo "useragent:\n\n". $useragent ."\r\n\n||\n\n"; if (curl_getinfo($request,CURLINFO_HTTP_CODE) == 200){ if ($contents === TRUE || $contents === FALSE) { $contents = ""; } echo $contents; } curl_close($request); } function getadqCookie(){ global $Adq_COOKIE; $ext_user_id = NULL; if(isset($_COOKIE[$Adq_COOKIE])) { $ext_user_id = $_COOKIE[$Adq_COOKIE]; } return $ext_user_id; } function setUserCookie() { global $Adq_COOKIE; if(! isset($_COOKIE[$Adq_COOKIE])) { $value = time().rand(); setcookie($Adq_COOKIE, $value, time()+3600*24*75, "/"); } } function deleteUserCookie() { global $Adq_COOKIE; unset($_COOKIE[$Adq_COOKIE]); $res = setcookie($Adq_COOKIE, '', time() - 3600); } ?>

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)
7.4.60.0030.01416.21
7.4.50.0060.01316.33
7.4.40.0070.01116.36
7.4.30.0070.01315.96
7.4.20.0090.01116.39
7.4.10.0060.01316.34
7.4.00.0050.01215.93
7.3.180.0140.00316.58
7.3.170.0160.00616.62
7.3.160.0150.00416.45
7.3.150.0110.00616.51
7.3.140.0090.01316.63
7.3.130.0030.01816.42
7.3.120.0090.01115.66
7.3.110.0080.01215.68
7.3.100.0070.01115.70
7.3.90.0020.01615.71
7.3.80.0110.00815.58
7.3.70.0040.01015.70
7.3.60.0120.00915.59
7.3.50.0140.00715.57
7.3.40.0030.01115.63
7.3.30.0110.00815.65
7.3.20.0070.01016.52
7.3.10.0050.01116.59
7.3.00.0090.00716.66
7.2.310.0140.00416.44
7.2.300.0070.01416.46
7.2.290.0030.01416.54
7.2.280.0030.01416.41
7.2.270.0140.00816.70
7.2.260.0090.00916.56
7.2.250.0050.01615.82
7.2.240.0090.01315.88
7.2.230.0080.01015.96
7.2.220.0060.01315.87
7.2.210.0050.01215.56
7.2.200.0080.01216.02
7.2.190.0070.01015.90
7.2.180.0110.00915.98
7.2.170.0100.00915.84
7.2.160.0070.00915.85
7.2.150.0130.00616.89
7.2.140.0050.01416.86
7.2.130.0080.00816.86
7.2.120.0090.00916.71
7.2.110.0090.01016.74
7.2.100.0110.00716.86
7.2.90.0100.00916.91
7.2.80.0130.00816.82
7.2.70.0110.01316.75
7.2.60.0090.00616.74
7.2.50.0150.00916.98
7.2.40.0090.00616.90
7.2.30.0150.00916.91
7.2.20.0100.01316.71
7.2.10.0060.01416.95
7.2.00.0100.00617.65
7.1.330.0130.00815.72
7.1.320.0160.00315.81
7.1.310.0070.01215.61
7.1.300.0100.00815.62
7.1.290.0130.01115.49
7.1.280.0110.00315.68
7.1.270.0070.01115.64
7.1.260.0060.01015.78
7.1.250.0080.00615.63
7.1.240.0070.01115.80
7.1.230.0110.00815.77
7.1.220.0010.01315.75
7.1.210.0120.00415.59
7.1.200.0170.00915.74
7.1.190.0080.01315.77
7.1.180.0050.00915.64
7.1.170.0070.00715.68
7.1.160.0080.01015.67
7.1.150.0070.00915.63
7.1.140.0040.01415.61
7.1.130.0110.00915.79
7.1.120.0130.00915.77
7.1.110.0070.00915.55
7.1.100.0110.00516.57
7.1.90.0090.01115.67
7.1.80.0100.01415.66
7.1.70.0090.00416.27
7.1.60.0070.01316.93
7.1.50.0110.00516.17
7.1.40.0080.00915.57
7.1.30.0170.00315.71
7.1.20.0080.00915.82
7.1.10.0130.00815.66
7.1.00.0070.03017.80
7.0.330.0070.00615.38
7.0.320.0140.00315.30
7.0.310.0030.00915.32
7.0.300.0110.00515.34
7.0.290.0080.01115.31
7.0.280.0120.00815.24
7.0.270.0080.00915.34
7.0.260.0110.00615.39
7.0.250.0080.01015.35
7.0.240.0090.00515.43
7.0.230.0090.00815.31
7.0.220.0070.01115.31
7.0.210.0110.00515.35
7.0.200.0150.00615.20
7.0.190.0130.00715.49
7.0.180.0080.00615.36
7.0.170.0090.00715.47
7.0.160.0070.00915.38
7.0.150.0090.00715.31
7.0.140.0120.00615.29
7.0.130.0060.00915.46
7.0.120.0100.00615.47
7.0.110.0050.01015.26
7.0.100.0080.00715.24
7.0.90.0080.01015.35
7.0.80.0200.03316.80
7.0.70.0290.02816.95
7.0.60.0260.03317.05
7.0.50.0230.02517.13
7.0.40.0110.03016.23
7.0.30.0090.02516.25
7.0.20.0140.02116.36
7.0.10.0160.02116.39
7.0.00.0100.01716.19
5.6.400.0070.01015.11
5.6.390.0050.01115.24
5.6.380.0060.01015.06
5.6.370.0080.00915.00
5.6.360.0090.00815.24
5.6.350.0080.01415.17
5.6.340.0100.00715.07
5.6.330.0060.01215.24
5.6.320.0120.00615.25
5.6.310.0100.00815.09
5.6.300.0080.01015.10
5.6.290.0120.00715.07
5.6.280.0070.03117.01
5.6.270.0090.00815.18
5.6.260.0120.00415.16
5.6.250.0070.01115.15
5.6.240.0090.01015.17
5.6.230.0100.03416.97
5.6.220.0100.03216.90
5.6.210.0060.03316.95
5.6.200.0120.03017.14
5.6.190.0080.02117.05
5.6.180.0080.03317.04
5.6.170.0120.01917.09
5.6.160.0090.02717.32
5.6.150.0110.03517.10
5.6.140.0080.02217.09
5.6.130.0150.02517.27
5.6.120.0130.03217.21
5.6.110.0040.03817.10
5.6.100.0100.02517.10
5.6.90.0130.02417.06
5.6.80.0070.02417.00
5.6.70.0120.02016.92
5.6.60.0070.03216.81
5.6.50.0060.02416.92
5.6.40.0090.03116.89
5.6.30.0080.01816.85
5.6.20.0080.03316.78
5.6.10.0130.02516.92
5.6.00.0110.01816.70
5.5.380.0100.00915.21
5.5.370.0060.02116.89
5.5.360.0080.02716.85
5.5.350.0070.03716.90
5.5.340.0120.02916.88
5.5.330.0100.03316.87
5.5.320.0050.02416.98
5.5.310.0110.03217.10
5.5.300.0130.02917.11
5.5.290.0090.03417.04
5.5.280.0120.03316.96
5.5.270.0060.03517.05
5.5.260.0070.03716.91
5.5.250.0080.03216.84
5.5.240.0100.02216.81
5.5.230.0080.03116.72
5.5.220.0110.02916.81
5.5.210.0140.02416.70
5.5.200.0090.03116.78
5.5.190.0130.03116.67
5.5.180.0100.03316.79
5.5.170.0160.00415.12
5.5.160.0050.02516.84
5.5.150.0150.02416.67
5.5.140.0060.02316.77
5.5.130.0010.02416.76
5.5.120.0100.02916.73
5.5.110.0050.02816.75
5.5.100.0110.01916.73
5.5.90.0140.02716.75
5.5.80.0080.03016.68
5.5.70.0110.02516.66
5.5.60.0100.02816.56
5.5.50.0090.02916.72
5.5.40.0100.01916.63
5.5.30.0060.02916.70
5.5.20.0100.03316.58
5.5.10.0040.03616.81
5.5.00.0060.02116.41
5.4.450.0060.03415.02
5.4.440.0050.02715.03
5.4.430.0110.02314.89
5.4.420.0140.02315.08
5.4.410.0070.03114.90
5.4.400.0030.03214.86
5.4.390.0060.03214.81
5.4.380.0070.02914.82
5.4.370.0080.03014.81
5.4.360.0050.02414.73
5.4.350.0060.03114.86
5.4.340.0090.03014.80
5.4.330.0070.00712.73
5.4.320.0070.02814.87
5.4.310.0090.02914.74
5.4.300.0080.01614.83
5.4.290.0050.02014.88
5.4.280.0160.02514.92
5.4.270.0040.03214.82
5.4.260.0030.02414.88
5.4.250.0090.01914.84
5.4.240.0020.03514.84
5.4.230.0080.03114.86
5.4.220.0070.03314.79
5.4.210.0100.02614.73
5.4.200.0090.03014.77
5.4.190.0060.02114.91
5.4.180.0030.03414.87
5.4.170.0080.02814.80
5.4.160.0070.02714.81
5.4.150.0030.03214.87
5.4.140.0130.01613.94
5.4.130.0090.01513.95
5.4.120.0090.01713.97
5.4.110.0040.03114.00
5.4.100.0040.02813.94
5.4.90.0070.02814.01
5.4.80.0060.02814.04
5.4.70.0060.02514.02
5.4.60.0060.02613.94
5.4.50.0090.02513.99
5.4.40.0040.02513.98
5.4.30.0100.02413.98
5.4.20.0090.01913.93
5.4.10.0070.02913.96
5.4.00.0070.02513.85
5.3.290.0060.03714.03
5.3.280.0050.03313.88
5.3.270.0060.04113.98
5.3.260.0070.04313.88
5.3.250.0100.03813.90
5.3.240.0100.02713.93
5.3.230.0140.02413.98
5.3.220.0060.02513.92
5.3.210.0070.03213.82
5.3.200.0060.03513.78
5.3.190.0160.04113.86
5.3.180.0080.04213.83
5.3.170.0110.03613.89
5.3.160.0080.04613.91
5.3.150.0140.02813.85
5.3.140.0080.04513.88
5.3.130.0030.04713.97
5.3.120.0070.03013.96
5.3.110.0080.02813.86
5.3.100.0060.04213.58
5.3.90.0090.03713.68
5.3.80.0050.04013.56
5.3.70.0090.03813.47
5.3.60.0150.03813.65
5.3.50.0050.04113.55
5.3.40.0110.03513.56
5.3.30.0070.04013.54
5.3.20.0050.03513.44
5.3.10.0080.03813.20
5.3.00.0040.04413.27
5.2.170.0030.02511.99
5.2.160.0020.03811.94
5.2.150.0080.02911.88
5.2.140.0080.03311.80
5.2.130.0020.03811.82
5.2.120.0020.04011.88
5.2.110.0110.02511.96
5.2.100.0050.03711.90
5.2.90.0070.02511.92
5.2.80.0120.03011.75
5.2.70.0050.02511.77
5.2.60.0080.02511.79
5.2.50.0070.01811.74
5.2.40.0050.03511.86
5.2.30.0080.02711.78
5.2.20.0020.03411.78
5.2.10.0060.02911.67
5.2.00.0090.01711.64
5.1.60.0080.02611.38
5.1.50.0050.03211.36
5.1.40.0090.02411.37
5.1.30.0060.03211.51
5.1.20.0080.02611.34
5.1.10.0050.03111.52
5.1.00.0030.02611.27
5.0.50.0030.02110.90
5.0.40.0020.02110.90
5.0.30.0060.02510.90
5.0.20.0060.02310.90
5.0.10.0050.01610.90
5.0.00.0040.03910.90
4.4.90.0060.01710.90
4.4.80.0050.00810.90
4.4.70.0020.02210.90
4.4.60.0030.01910.90
4.4.50.0000.02310.90
4.4.40.0080.01710.90
4.4.30.0000.01710.90
4.4.20.0020.02210.90
4.4.10.0050.01810.90
4.4.00.0020.01810.90
4.3.110.0020.02210.90
4.3.100.0050.01710.90
4.3.90.0060.01410.90
4.3.80.0050.02810.90
4.3.70.0020.02110.90
4.3.60.0020.01810.90
4.3.50.0020.01810.90
4.3.40.0050.02710.90
4.3.30.0020.02210.90
4.3.20.0060.01510.90
4.3.10.0040.01810.90
4.3.00.0020.01810.90

preferences:
43.39 ms | 401 KiB | 5 Q