3v4l.org

run code in 300+ PHP versions simultaneously
<?php $searchq = "cabinet"; $curlPost = 'field-keywords=' . urlencode($searchq) . '&url=index=music&Go=Go'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://www.amazon.co.uk/exec/obidos/search-handle-form/203-8005778-2511947'); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost); $data = curl_exec($ch); curl_close($ch); $rows = explode("\n",$data); foreach($rows as $row) { if(!$row) continue; if(!strstr($row,'href')) continue; if(!strstr($row,'ASIN')) continue; if(!strstr($row,'<b>')) continue; if(strstr($row,'[VINYL]')) continue; if(strstr($row,'[CASSETTE]')) continue; $full_url_row = str_replace('<a href=','http://www.amazon.co.uk',$row); // add the full url $no_bold_tag = str_replace('><b>','#',$full_url_row); // replace the bold tag with # $cdurl = substr($no_bold_tag,0,strpos($no_bold_tag,'#')); $itemdesc = substr($no_bold_tag,strpos($no_bold_tag,'#')+1,strlen($no_bold_tag)); // everything after # is the desc $asin_start = strpos($cdurl,'ASIN/'); // the ASIN appears in the url after ASIN/ $asin = substr($cdurl,$asin_start+5,10); // the ASIN is thankfully always 10 long (we add 5 first to get rid of ASIN/ $strout = "\"$searchq\",\"$asin\",\"$cdurl\",\"$itemdesc\"\n"; // compose the csv string echo "$itemdesc $asin $cdurl\n"; // echo it to the browser, so we can see what's going on }

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.0190.00016.75
8.3.50.0070.01217.53
8.3.40.0040.01118.59
8.3.30.0120.00318.71
8.3.20.0080.00018.75
8.3.10.0050.00318.95
8.3.00.0040.00717.63
8.2.180.0060.01216.63
8.2.170.0190.00322.96
8.2.160.0070.00719.09
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.79
8.2.110.0090.00020.27
8.2.100.0120.00017.91
8.2.90.0040.00419.17
8.2.80.0090.00017.97
8.2.70.0030.00617.59
8.2.60.0060.00317.93
8.2.50.0050.00317.93
8.2.40.0030.00519.47
8.2.30.0020.01017.81
8.2.20.0100.00017.79
8.2.10.0020.00517.92
8.2.00.0110.00017.98
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00320.84
8.1.230.0030.00918.92
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0080.00017.22
8.1.180.0090.00018.10
8.1.170.0030.00518.91
8.1.160.0040.00419.11
8.1.150.0000.00718.66
8.1.140.0000.00817.42
8.1.130.0040.00417.50
8.1.120.0030.00517.50
8.1.110.0050.00317.47
8.1.100.0040.00417.53
8.1.90.0040.00417.40
8.1.80.0000.00717.39
8.1.70.0030.00317.42
8.1.60.0040.00417.57
8.1.50.0000.00817.60
8.1.40.0060.00317.55
8.1.30.0000.00817.71
8.1.20.0060.00317.57
8.1.10.0040.00417.69
8.1.00.0100.00017.47
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0040.00418.62
8.0.270.0040.00417.24
8.0.260.0070.00016.98
8.0.250.0030.00716.93
8.0.240.0030.00617.08
8.0.230.0040.00416.95
8.0.220.0030.00316.89
8.0.210.0040.00417.06
8.0.200.0070.00016.95
8.0.190.0040.00417.02
8.0.180.0040.00417.09
8.0.170.0030.00617.02
8.0.160.0000.00816.98
8.0.150.0000.00816.90
8.0.140.0040.00416.96
8.0.130.0050.00013.47
8.0.120.0030.00616.96
8.0.110.0040.00417.11
8.0.100.0070.00016.89
8.0.90.0040.00416.95
8.0.80.0160.00617.06
8.0.70.0050.00217.06
8.0.60.0000.00916.99
8.0.50.0060.00316.94
8.0.30.0070.01017.14
8.0.20.0090.00917.13
8.0.10.0000.00716.93
8.0.00.0170.00616.83
7.4.330.0050.00012.98
7.4.320.0030.00316.56
7.4.300.0080.00016.60
7.4.290.0030.00716.65
7.4.280.0000.00716.60
7.4.270.0030.00416.51
7.4.260.0020.00413.25
7.4.250.0060.00316.59
7.4.240.0000.00716.50
7.4.230.0070.00016.44
7.4.220.0090.01516.51
7.4.210.0070.01016.59
7.4.200.0030.00316.73
7.4.190.0000.00916.50
7.4.160.0070.01116.55
7.4.150.0100.00716.72
7.4.140.0030.01417.86
7.4.130.0160.00316.65
7.4.120.0140.00316.64
7.4.110.0030.01616.59
7.4.100.0120.01016.61
7.4.90.0080.01716.36
7.4.80.0100.00719.39
7.4.70.0090.00916.45
7.4.60.0030.01416.71
7.4.50.0030.00316.64
7.4.40.0060.00616.56
7.4.30.0100.00716.34
7.4.00.0090.00615.12
7.3.330.0000.00713.14
7.3.320.0040.00413.09
7.3.310.0030.00316.33
7.3.300.0060.00016.27
7.3.290.0090.00516.30
7.3.280.0140.00716.25
7.3.270.0030.01316.52
7.3.260.0100.00716.30
7.3.240.0100.01316.44
7.3.230.0050.01416.36
7.3.210.0120.00616.55
7.3.200.0100.00716.62
7.3.190.0030.01316.43
7.3.180.0070.01016.42
7.3.170.0070.01016.53
7.3.160.0090.01216.29
7.3.120.0150.00414.98
7.3.10.0100.00816.34
7.3.00.0050.01116.54
7.2.330.0130.00416.66
7.2.320.0100.00716.70
7.2.310.0150.00416.35
7.2.300.0130.00516.50
7.2.290.0090.00916.66
7.2.130.0050.00716.57
7.2.120.0090.00416.66
7.2.110.0090.00516.48
7.2.100.0110.00716.63
7.2.90.0170.00716.44
7.2.80.0110.00716.66
7.2.70.0140.00916.63
7.2.60.0500.00816.22
7.2.50.0160.00816.57
7.2.40.0170.00816.85
7.2.30.0090.00616.63
7.2.20.0100.00816.49
7.2.10.0090.00416.74
7.2.00.0100.00317.30
7.1.250.0110.00515.36
7.1.200.0000.00915.79
7.1.100.0100.00317.60
7.1.70.0030.00617.27
7.1.60.0100.01319.25
7.1.50.0040.01817.04
7.1.00.0000.04022.30
7.0.200.0030.00716.82
7.0.140.0030.07322.01
7.0.120.0000.06722.04
7.0.60.0100.07720.03
7.0.50.0070.06717.68
7.0.40.0070.08020.27
7.0.30.0330.05320.18
7.0.20.0330.07720.16
7.0.10.0170.04720.29
7.0.00.0070.05320.16
5.6.280.0100.06321.13
5.6.210.0170.04020.56
5.6.200.0070.08318.13
5.6.190.0030.08020.49
5.6.180.0270.05720.67
5.6.170.0300.06320.71
5.6.160.0000.04320.61
5.6.150.0130.07318.09
5.6.140.0030.07318.13
5.6.130.0130.06718.20
5.6.120.0000.04721.01
5.6.110.0030.04021.03
5.6.100.0130.04720.97
5.6.90.0170.07720.99
5.6.80.0100.05320.48
5.5.350.0330.06320.36
5.5.340.0070.04317.93
5.5.330.0070.04020.41
5.5.320.0070.03720.28
5.5.310.0230.07720.30
5.5.300.0070.07017.89
5.5.290.0030.04317.88
5.5.280.0100.06720.89
5.5.270.0130.07720.88
5.5.260.0100.08020.80
5.5.250.0030.06720.70
5.5.240.0200.07720.29
5.4.450.0230.04319.41
5.4.440.0270.04319.44
5.4.430.0230.04019.24
5.4.420.0300.07319.11
5.4.410.0330.04019.33
5.4.400.0330.04018.94
5.4.390.0230.07718.88
5.4.380.0270.06019.13
5.4.370.0200.04019.16
5.4.360.0270.06719.06
5.4.350.0230.03718.81
5.4.340.0230.05019.09
5.4.320.0370.05319.24
5.4.310.0270.04019.07
5.4.300.0330.05319.06
5.4.290.0330.06718.80
5.4.280.0400.03718.80
5.4.270.0300.04719.14
5.4.260.0270.03719.08
5.4.250.0370.07019.09
5.4.240.0300.07318.92
5.4.230.0300.06718.80
5.4.220.0330.05319.08
5.4.210.0330.06719.07
5.4.200.0230.06719.12
5.4.190.0330.06718.79
5.4.180.0370.06319.15
5.4.170.0370.06718.92
5.4.160.0400.06319.07
5.4.150.0300.04719.07
5.4.140.0270.05316.27
5.4.130.0270.03316.32
5.4.120.0300.05316.45
5.4.110.0170.04016.21
5.4.100.0230.03316.40
5.4.90.0200.03716.42
5.4.80.0270.03016.38
5.4.70.0130.03716.03
5.4.60.0300.03316.48
5.4.50.0270.02716.45
5.4.40.0300.03016.05
5.4.30.0200.03316.38
5.4.20.0230.03016.04
5.4.10.0170.03716.19
5.4.00.0200.03715.75
5.3.290.0230.07714.71
5.3.280.0430.06314.66
5.3.270.0370.06714.47
5.3.260.0230.06314.58
5.3.250.0300.06714.57
5.3.240.0230.05314.61
5.3.230.0330.07014.47
5.3.220.0300.04014.57
5.3.210.0230.05714.41
5.3.200.0230.05014.63
5.3.190.0230.04714.56
5.3.180.0230.03314.42
5.3.170.0170.03714.61
5.3.160.0270.03014.54
5.3.150.0200.03314.55
5.3.140.0270.02714.51
5.3.130.0200.03714.41
5.3.120.0170.04314.51
5.3.110.0170.03714.61
5.3.100.0200.03714.01
5.3.90.0270.02713.89
5.3.80.0230.03314.02
5.3.70.0230.03313.88
5.3.60.0230.03313.80
5.3.50.0230.03313.75
5.3.40.0130.04013.95
5.3.30.0170.04013.73
5.3.20.0170.03313.55
5.3.10.0270.03313.62
5.3.00.0200.03313.57
5.2.170.0130.03011.91
5.2.160.0130.03011.91
5.2.150.0130.03011.91
5.2.140.0170.03011.91
5.2.130.0200.02311.91
5.2.120.0130.03011.91
5.2.110.0130.03311.91
5.2.100.0130.03011.91
5.2.90.0170.02711.91
5.2.80.0200.03311.91
5.2.70.0200.02311.91
5.2.60.0230.02711.91
5.2.50.0130.03011.91
5.2.40.0100.03011.91
5.2.30.0130.02711.91
5.2.20.0100.02711.91
5.2.10.0100.03011.91
5.2.00.0100.03011.91
5.1.60.0170.03011.91
5.1.50.0200.04311.91
5.1.40.0170.04011.91
5.1.30.0130.02711.91
5.1.20.0170.02311.91
5.1.10.0170.05011.91
5.1.00.0200.05011.91
5.0.50.0100.02711.91
5.0.40.0100.02311.91
5.0.30.0100.06011.91
5.0.20.0100.02311.91
5.0.10.0070.02311.91
5.0.00.0030.03311.91
4.4.90.0070.01711.91
4.4.80.0070.01311.91
4.4.70.0070.01311.91
4.4.60.0100.01311.91
4.4.50.0000.02011.91
4.4.40.0070.03011.91
4.4.30.0070.03711.91
4.4.20.0030.02311.91
4.4.10.0070.03311.91
4.4.00.0130.03011.91
4.3.110.0070.03311.91
4.3.100.0130.01711.91
4.3.90.0070.02011.91
4.3.80.0100.05011.91
4.3.70.0170.02711.91
4.3.60.0070.03711.91
4.3.50.0100.02311.91
4.3.40.0070.03011.91
4.3.30.0070.01311.91
4.3.20.0030.01711.91
4.3.10.0000.01711.91
4.3.00.0030.02011.91

preferences:
39.7 ms | 401 KiB | 5 Q