3v4l.org

run code in 300+ PHP versions simultaneously
<?php function SaveFile($TYPE,$dataset,$lang) { // Para substituir acentos e cedilhas $patterns[0] = '/[á|â|à|å|ä]/'; $patterns[1] = '/[ð|é|ê|è|ë]/'; $patterns[2] = '/[í|î|ì|ï]/'; $patterns[3] = '/[ó|ô|ò|ø|õ|ö]/'; $patterns[4] = '/[ú|û|ù|ü]/'; $patterns[5] = '/ç/'; $replacements[0] = 'a'; $replacements[1] = 'e'; $replacements[2] = 'i'; $replacements[3] = 'o'; $replacements[4] = 'u'; $replacements[5] = 'c'; //ficheiros em minusculas e sem espacos e em HTML e em Ingles e PT $TYPE2 = strtolower(str_replace (" ", "", $TYPE)); $myFile = "files/".$TYPE2."_".$lang.".php"; $myFile2 = preg_replace($patterns, $replacements, $myFile); $fh = fopen($myFile2, 'a'); //fwrite($fh, "<link rel=\"stylesheet\" type=\"text/css\" href=\"livestream.css\">\n"); //fwrite($fh, "<table>\n"); fwrite($fh, $dataset); //fwrite($fh, "</table>\n"); fclose($fh); } // DEFINIR IDIOMA $LANG=$_REQUEST["lang"]; // EN=1 // PT=22 if($LANG=="pt" OR $LANG==""){ $LANG="22"; $WATCHHERE="Veja aqui"; $link="http://imstore.bet365affiliates.com/Tracker.aspx?AffiliateId=16136&AffiliateCode=365_022055&CID=360&PID=149&TID=3&LNG=22&DID=27"; } if($LANG=="en"){ $LANG="1"; $WATCHHERE="Watch here"; $link="http://imstore.bet365affiliates.com/Tracker.aspx?AffiliateId=16136&AffiliateCode=365_044431&CID=360&PID=149&TID=3&LNG=1&DID=27"; } $dom = new DomDocument; $dom->preserveWhiteSpace = TRUE; $dom->load( 'http://oddsfeed.bet365.com/DiaryStreaming.aspx?LanguageId='.$LANG ); $params = $dom->getElementsByTagName('Event'); // Find Sections $k=0; foreach ($params as $param) //go to each section 1 by 1 { $JOGO = utf8_decode($params->item($k)->getAttribute('EventName')); $EVENTSTART = $params->item($k)->getAttribute('EventStart'); $TYPE_ID = $params->item($k)->getAttribute('ClassificationID'); $TYPE = utf8_decode($params->item($k)->getAttribute('Classification')); $EVENTGROUP = $params->item($k)->getAttribute('EventGroup'); if (preg_match("/portugal/i", $EVENTGROUP)) { $BOLD1="<b>"; $BOLD2="</b>"; } else { $BOLD1=""; $BOLD2=""; } $datetime = new DateTime("$EVENTSTART"); $DATA= $datetime->format('d-m-Y'); $HORA= $datetime->format('H:i'); $i = 0; do { if($TYPE_ID==$i) { $dataset = "<tr><td align='left'>$BOLD1 $DATA - $HORA</td><td align='left'>$BOLD1 $JOGO</td><td align='left'><a target='_blank' href='$link'>$BOLD1 $WATCHHERE $BOLD2</a></td></tr>\n"; SaveFile($TYPE, $dataset, $LANG); } ++$i; } while ($i < 500); $k++; } ?>

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.70.0100.00718.71
8.3.60.0040.01217.13
8.3.50.0140.00721.26
8.3.40.0190.00019.48
8.3.30.0040.01119.29
8.3.20.0080.00020.71
8.3.10.0080.00022.27
8.3.00.0080.00023.95
8.2.190.0070.01118.79
8.2.180.0040.01117.00
8.2.170.0120.00322.96
8.2.160.0090.00620.54
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00420.27
8.2.120.0080.00026.35
8.2.110.0070.00322.58
8.2.100.0080.00318.40
8.2.90.0000.00819.55
8.2.80.0030.00618.18
8.2.70.0070.00318.13
8.2.60.0030.00518.43
8.2.50.0040.00418.07
8.2.40.0050.00322.73
8.2.30.0020.00519.86
8.2.20.0030.00518.20
8.2.10.0100.00018.46
8.2.00.0000.00818.55
8.1.280.0070.01025.92
8.1.270.0080.01224.17
8.1.260.0030.00628.09
8.1.250.0000.00828.09
8.1.240.0090.00022.56
8.1.230.0080.00319.54
8.1.220.0030.00517.91
8.1.210.0050.00318.77
8.1.200.0060.00317.75
8.1.190.0000.00917.73
8.1.180.0040.00418.10
8.1.170.0030.00618.96
8.1.160.0080.00021.02
8.1.150.0080.00019.19
8.1.140.0100.00319.89
8.1.130.0070.00017.98
8.1.120.0040.00417.81
8.1.110.0030.00517.71
8.1.100.0040.00417.75
8.1.90.0000.00717.71
8.1.80.0040.00417.82
8.1.70.0050.00317.86
8.1.60.0030.00617.81
8.1.50.0030.00617.63
8.1.40.0030.00617.87
8.1.30.0040.00417.99
8.1.20.0000.00817.91
8.1.10.0000.00917.69
8.1.00.0030.00617.89
8.0.300.0040.00418.77
8.0.290.0040.00417.13
8.0.280.0040.00418.78
8.0.270.0040.00417.60
8.0.260.0030.00317.52
8.0.250.0030.00317.16
8.0.240.0000.00817.34
8.0.230.0000.00917.30
8.0.220.0070.00017.25
8.0.210.0050.00317.35
8.0.200.0030.00317.26
8.0.190.0000.00917.23
8.0.180.0050.00317.28
8.0.170.0040.00417.33
8.0.160.0020.00517.16
8.0.150.0080.00017.30
8.0.140.0000.00717.24
8.0.130.0030.00313.74
8.0.120.0040.00417.14
8.0.110.0040.00417.30
8.0.100.0050.00317.31
8.0.90.0040.00417.43
8.0.80.0070.01317.44
8.0.70.0060.00317.37
8.0.60.0040.00417.33
8.0.50.0030.00617.42
8.0.30.0080.01217.49
8.0.20.0110.01017.43
8.0.10.0030.00517.46
8.0.00.0090.01117.08
7.4.330.0000.00517.18
7.4.320.0000.00816.85
7.4.300.0050.00216.84
7.4.290.0000.00716.93
7.4.280.0030.00616.89
7.4.270.0030.00316.77
7.4.260.0000.00716.90
7.4.250.0030.00616.82
7.4.240.0060.00216.78
7.4.230.0000.00816.90
7.4.220.0120.00917.08
7.4.210.0120.00516.99
7.4.200.0040.00416.77
7.4.160.0120.00616.86
7.4.150.0060.01517.40
7.4.140.0130.00617.86
7.4.130.0170.00916.87
7.4.120.0120.01017.00
7.4.110.0100.01016.71
7.4.100.0130.01316.92
7.4.90.0110.00716.96
7.4.80.0060.01219.39
7.4.70.0030.01417.02
7.4.60.0060.01216.89
7.4.50.0090.00617.08
7.4.40.0060.01316.86
7.4.30.0100.01016.93
7.4.00.0100.00715.27
7.3.330.0080.00013.59
7.3.320.0050.00013.66
7.3.310.0000.00716.71
7.3.300.0000.00716.82
7.3.290.0050.00216.73
7.3.280.0100.00816.79
7.3.270.0150.00917.40
7.3.260.0160.01016.75
7.3.240.0110.00816.89
7.3.230.0090.00916.82
7.3.210.0060.01216.73
7.3.200.0120.00919.39
7.3.190.0180.00616.71
7.3.180.0030.01416.84
7.3.170.0070.01116.78
7.3.160.0140.00617.05
7.3.10.0080.00816.82
7.3.00.0100.00816.82
7.2.330.0140.00517.07
7.2.320.0070.01416.79
7.2.310.0090.01217.12
7.2.300.0140.00717.11
7.2.290.0170.00717.12
7.2.130.0130.00817.10
7.2.120.0080.01016.89
7.2.110.0110.01116.88
7.2.100.0110.00917.01
7.2.90.0100.01216.99
7.2.80.0130.00717.06
7.2.70.0110.00517.15
7.2.60.0070.00917.28
7.2.50.0090.00716.84
7.2.40.0070.01316.87
7.2.30.0130.00716.89
7.2.20.0070.00717.06
7.2.10.0110.00816.90
7.2.00.0090.00817.94
7.1.250.0050.00715.74
7.1.240.0030.00715.92
7.1.230.0070.00715.96
7.1.220.0000.01216.11
7.1.210.0070.00716.05
7.1.200.0090.00516.12
7.1.190.0060.00616.16
7.1.180.0040.00916.01
7.1.170.0050.00516.02
7.1.160.0040.00716.10
7.1.150.0040.00815.99
7.1.140.0060.00916.14
7.1.130.0030.00916.02
7.1.120.0000.01115.92
7.1.110.0070.00316.01
7.1.100.0080.01217.19
7.1.90.0040.00816.13
7.1.80.0060.00915.70
7.1.70.0050.00516.75
7.1.60.0070.01417.53
7.1.50.0050.01216.70
7.1.40.0000.01616.16
7.1.30.0100.01015.82
7.1.20.0080.00515.99
7.1.10.0090.00616.17
7.1.00.0060.04219.48
7.0.330.0030.00715.64
7.0.320.0060.00615.62
7.0.310.0040.00415.64
7.0.300.0060.00615.70
7.0.290.0100.00715.46
7.0.280.0000.01415.46
7.0.270.0060.00615.69
7.0.260.0130.00015.66
7.0.250.0030.01415.86
7.0.240.0040.00415.73
7.0.230.0070.00715.73
7.0.220.0030.00615.60
7.0.210.0120.00315.39
7.0.200.0020.00916.42
7.0.190.0070.00715.65
7.0.180.0040.00715.59
7.0.170.0030.00715.66
7.0.160.0060.00315.30
7.0.150.0040.00815.38
7.0.140.0120.00015.52
7.0.130.0070.00415.66
7.0.120.0000.01715.70
7.0.110.0030.00815.41
7.0.100.0190.00015.25
7.0.90.0120.00015.59
7.0.80.0030.01015.67
7.0.70.0070.00715.62
7.0.60.0080.04718.88
7.0.50.0080.02516.84
7.0.40.0100.03617.06
7.0.30.0170.02317.18
7.0.20.0190.01817.16
7.0.10.0030.03217.18
7.0.00.0060.03017.07
5.6.380.0000.01514.72
5.6.370.0000.00714.59
5.6.360.0040.00814.97
5.6.350.0050.00314.81
5.6.340.0030.01014.95
5.6.330.0060.00314.33
5.6.320.0000.01714.75
5.6.310.0000.01314.72
5.6.300.0000.01614.82
5.6.290.0070.00714.67
5.6.280.0050.02018.02
5.6.270.0070.00714.67
5.6.260.0000.01014.61
5.6.250.0090.00614.59
5.6.240.0030.01014.97
5.6.230.0090.00614.90
5.6.220.0000.01514.60
5.6.210.0120.04218.01
5.6.200.0030.02916.63
5.6.190.0050.02617.85
5.6.180.0260.04117.79
5.6.170.0130.03717.84
5.6.160.0130.04017.82
5.6.150.0080.03316.64
5.6.140.0070.03916.66
5.6.130.0090.03416.63
5.6.120.0100.02018.04
5.6.110.0080.04517.94
5.6.100.0050.04718.08
5.6.90.0070.04518.01
5.6.80.0040.03917.74
5.6.70.0040.01114.41
5.6.60.0100.00714.36
5.6.50.0090.00014.57
5.6.40.0090.01214.60
5.6.30.0040.00714.48
5.6.20.0070.01114.75
5.6.10.0090.00614.42
5.6.00.0060.01314.54
5.5.380.0000.01211.23
5.5.370.0000.01211.53
5.5.360.0070.00411.28
5.5.350.0130.03516.33
5.5.340.0100.03814.99
5.5.330.0080.02316.16
5.5.320.0340.02316.07
5.5.310.0220.03216.12
5.5.300.0050.02215.07
5.5.290.0050.04414.95
5.5.280.0050.04716.37
5.5.270.0070.02316.33
5.5.260.0020.04816.56
5.5.250.0050.02316.03
5.5.240.0050.02615.96
5.5.230.0070.00711.50
5.5.220.0100.00311.18
5.5.210.0060.00311.47
5.5.200.0040.00711.15
5.5.190.0070.00411.63
5.5.180.0040.00411.63
5.5.170.0090.00311.61
5.5.160.0100.00011.36
5.5.150.0050.00511.55
5.5.140.0060.00311.39
5.5.130.0160.00011.38
5.5.120.0110.00311.28
5.5.110.0040.00811.02
5.5.100.0040.00311.43
5.5.90.0030.00611.16
5.5.80.0030.00310.98
5.5.70.0150.00311.10
5.5.60.0110.00711.20
5.5.50.0080.01211.32
5.5.40.0130.00910.98
5.5.30.0040.00711.19
5.5.20.0060.00311.18
5.5.10.0040.00711.02
5.5.00.0060.00910.95

preferences:
65.23 ms | 401 KiB | 5 Q