3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP // Shoutcast Server Stats // Parses shoutcasts xml to make an effective stats thing for any website // ©2004-2005 Daniel Brown http://www.gmtt.co.uk // Please refer to the readme file for use. ////////////////////////////////////////////////////////////////////////////////////////////// // Dinghy Radio Stats Information // Grabs the xml from your radio server and displays it in a iframe that refreshes every 30 seconds. // ©Daniel Brown www.gmtt.co.uk ////////////////////////////////////////////////////////////////////////////////////////////// //Configuracion $scdef = "Radio Ts-H"; // Nombre de la radio por defecto, se muestra cuando el servidor esta caido $scip = "94.23.149.176"; // ip or url del servidor shoutcast (NO AÑADIR HTTP:// No incluir el puerto) $scport = "9996"; // Puerto del servidor shoutcast $scpass = "tshdj"; // Contraseña del servidor to shoutcast //Fin configuratio $scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30); if(!$scfp) { $scsuccs=1; $locutor = 'Sin Locutor'; $actuals = 'Sin Cancion Actual'; $canciones = ' <b>1.</b> Sin Canciones Pasadas <BR><BR> <b>2.</b> Sin Canciones Pasadas <BR><BR> <b>3.</b> Sin Canciones Pasadas <BR><BR> <b>4.</b> Sin Canciones Pasadas <BR><BR> <b>5.</b> Sin Canciones Pasadas <BR><BR>' ; } if($scsuccs!=1){ fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); while(!feof($scfp)) { $page .= fgets($scfp, 1000); } ######################################################## /////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\ //define xml elements $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS"); $y=0; while($loop[$y]!=''){ $pageed = ereg_replace(".*<$loop[$y]>", "", $page); $scphp = strtolower($loop[$y]); $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed); if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE) $$scphp = urldecode($$scphp); // uncomment the next line to see all variables //echo'$'.$scphp.' = '.$$scphp.'<br>'; $y++; } //end intro xml elements ######################################################## ######################################################## /////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\ //get song info and history $pageed = ereg_replace(".*<SONGHISTORY>", "", $page); $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed); $songatime = explode("<SONG>", $pageed); $r=1; while($songatime[$r]!=""){ $t=$r-1; $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]); $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]); $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]); $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]); $song[$t] = urldecode($song[$t]); $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page); $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed); $r++; } //end song info fclose($scfp); } //display stats if($streamstatus == "1"){ //you may edit the html below, make sure to keep variable intact $locutor = ''.$servertitle.''; $actuals = ''.$song[0].''; $canciones = ' <b>1.</b> '.$song[1].'<BR><BR> <b>2.</b> '.$song[2].'<BR><BR> <b>3.</b> '.$song[3].'<BR><BR> <b>4.</b> '.$song[4].'<BR><BR> <b>5.</b> '.$song[5].'<BR><BR>' ; } if($streamstatus == "0") { //you may edit the html below, make sure to keep variable intact $locutor = 'Sin Locutor'; $actuals = 'Sin Cancion Actual'; $canciones = ' <b>1.</b> Sin Canciones Pasadas <BR><BR> <b>2.</b> Sin Canciones Pasadas <BR><BR> <b>3.</b> Sin Canciones Pasadas <BR><BR> <b>4.</b> Sin Canciones Pasadas <BR><BR> <b>5.</b> Sin Canciones Pasadas <BR><BR>' ; } ?>

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.80.0160.00719.39
7.4.70.0180.00319.39
7.4.60.0100.01019.39
7.4.50.0000.01819.39
7.4.40.0090.00919.39
7.4.30.0080.01219.39
7.4.20.0090.00919.39
7.4.10.0220.00019.39
7.4.00.0110.00719.39
7.3.200.0120.00619.39
7.3.190.0120.00819.39
7.3.180.0070.01519.39
7.3.170.0040.01219.39
7.3.160.0150.00419.39
7.3.150.0060.01019.39
7.3.140.0060.00919.39
7.3.130.0090.00919.39
7.3.120.0080.00819.39
7.3.110.0120.00619.39
7.3.100.0110.01119.39
7.3.90.0120.00919.39
7.3.80.0150.00019.39
7.3.70.0190.00519.39
7.3.60.0120.00419.39
7.3.50.0060.01419.39
7.3.40.0160.00319.39
7.3.30.0060.01719.39
7.3.20.0110.00619.39
7.3.10.0090.00919.39
7.3.00.0100.00719.39
7.2.320.0130.00919.39
7.2.310.0200.00019.39
7.2.300.0070.01619.39
7.2.290.0170.00019.39
7.2.280.0070.01019.39
7.2.270.0090.01219.39
7.2.260.0230.00619.39
7.2.250.0070.01019.39
7.2.240.0100.01019.39
7.2.230.0070.01119.39
7.2.220.0070.01119.39
7.2.210.0110.01119.39
7.2.200.0150.00919.39
7.2.190.0060.01119.39
7.2.180.0130.00619.39
7.2.170.0060.01119.39
7.2.160.0090.00919.39
7.2.150.0140.00319.39
7.2.140.0120.00619.39
7.2.130.0040.01219.39
7.2.120.0070.01419.39
7.2.110.0080.01219.39
7.2.100.0030.02119.39
7.2.90.0090.01519.39
7.2.80.0110.01119.39
7.2.70.0100.01119.39
7.2.60.0130.01019.39
7.2.50.0140.01419.39
7.2.40.0060.01119.39
7.2.30.0110.00719.39
7.2.20.0090.00919.39
7.2.10.0070.01219.39
7.2.00.0030.01619.39
7.1.330.0240.01119.39
7.1.320.0170.01219.39
7.1.310.0310.01119.39
7.1.300.0250.01419.39
7.1.290.0270.00919.39
7.1.280.0190.01419.39
7.1.270.0560.01019.39
7.1.260.0210.01219.39
7.1.250.0230.00619.39
7.1.240.0260.01019.39
7.1.230.0290.00619.39
7.1.220.0150.02219.39
7.1.210.0180.01619.39
7.1.200.0270.00619.39
7.1.190.0190.01619.39
7.1.180.0290.01519.39
7.1.170.0390.01519.39
7.1.160.0300.00019.39
7.1.150.0240.00719.39
7.1.140.0310.00819.39
7.1.130.0280.00319.39
7.1.120.0220.00619.39
7.1.110.0150.01519.39
7.1.100.0230.00619.39
7.1.90.0270.00619.39
7.1.80.0250.01119.39
7.1.70.0250.01119.39
7.1.60.0170.01719.39
7.1.50.0270.00419.39
7.1.40.0280.00719.39
7.1.30.0290.00019.39
7.1.20.0230.00919.39
7.1.10.0220.01019.39
7.1.00.0230.00519.39
7.0.330.0240.00719.39
7.0.320.0290.00719.39
7.0.310.0300.00619.39
7.0.300.0330.00619.39
7.0.290.0220.01019.39
7.0.280.0270.00719.39
7.0.270.0180.01519.39
7.0.260.0180.00919.39
7.0.250.0200.00719.39
7.0.240.0250.00319.39
7.0.230.0450.00319.39
7.0.220.0280.01219.39
7.0.210.0260.01019.39
7.0.200.0260.00719.39
7.0.190.0230.01119.39
7.0.180.0140.01219.39
7.0.170.0240.00319.39
7.0.160.0240.00319.39
7.0.150.0200.00719.39
7.0.140.0200.01719.39
7.0.130.0210.00919.39
7.0.120.0220.00819.39
7.0.110.0120.01619.39
7.0.100.0220.00419.39
7.0.90.0140.01219.39
7.0.80.0230.01019.39
7.0.70.0340.00519.39
7.0.60.0170.01019.39
7.0.50.0250.00019.39
7.0.40.0190.00619.39
7.0.30.0230.00519.39
7.0.20.0280.00519.39
7.0.10.0320.00719.39
7.0.00.0200.01019.39
5.6.400.0210.01119.39
5.6.390.0130.02219.39
5.6.380.0240.01219.39
5.6.370.0280.00819.39
5.6.360.0200.01319.39
5.6.350.0210.01019.39
5.6.340.0160.01919.39
5.6.330.0220.01419.39
5.6.320.0270.00419.39
5.6.310.0180.01519.39
5.6.300.0200.01319.39
5.6.290.0200.01619.39
5.6.280.0170.01019.39
5.6.270.0150.01519.39
5.6.260.0170.01519.39
5.6.250.0200.01019.39
5.6.240.0180.01119.39
5.6.230.0180.01119.39
5.6.220.0250.01119.39
5.6.210.0170.01119.39
5.6.200.0310.00019.39
5.6.190.0180.01219.39
5.6.180.0160.01219.39
5.6.170.0280.00419.39
5.6.160.0250.00519.39
5.6.150.0140.01419.39
5.6.140.0210.00819.39
5.6.130.0160.01419.39
5.6.120.0170.01119.39
5.6.110.0200.01219.39
5.6.100.0270.00519.39
5.6.90.0140.01419.39
5.6.80.0160.01619.39
5.6.70.0190.00719.39
5.6.60.0170.02019.39
5.6.50.0180.00919.39
5.6.40.0170.01219.39
5.6.30.0150.01919.39
5.6.20.0220.00619.39
5.6.10.0220.00819.39
5.6.00.0080.02019.39
5.5.380.0110.02219.39
5.5.370.0140.01619.39
5.5.360.0220.00719.39
5.5.350.0170.01219.39
5.5.340.0180.00919.39
5.5.330.0250.00319.39
5.5.320.0200.00719.39
5.5.310.0220.01019.39
5.5.300.0140.01519.39
5.5.290.0250.01119.39
5.5.280.0260.00919.39
5.5.270.0240.01219.39
5.5.260.0130.01619.39
5.5.250.0330.00419.39
5.5.240.0230.01419.39
5.5.230.0180.01119.39
5.5.220.0270.00919.39
5.5.210.0200.01419.39
5.5.200.0240.01219.39
5.5.190.0190.01019.39
5.5.180.0240.00419.39
5.5.170.0230.01319.39
5.5.160.0180.01419.39
5.5.150.0180.01119.39
5.5.140.0150.01519.39
5.5.130.0280.01119.39
5.5.120.0240.00619.39
5.5.110.0260.01719.39
5.5.100.0150.01919.39
5.5.90.0170.01519.39
5.5.80.0240.00319.39
5.5.70.0170.01019.39
5.5.60.0200.00919.39
5.5.50.0280.00619.39
5.5.40.0290.00519.39
5.5.30.0210.01319.39
5.5.20.0240.01019.39
5.5.10.0220.01319.39
5.5.00.0230.00719.39
5.4.450.0140.00919.39
5.4.440.0190.00819.39
5.4.430.0150.00819.39
5.4.420.0110.01119.39
5.4.410.0220.00219.39
5.4.400.0140.01119.39
5.4.390.0180.02819.00
5.4.380.0180.03818.86
5.4.370.0170.03818.91
5.4.360.0130.04018.89
5.4.350.0110.03416.61
5.4.340.0130.03116.70
5.4.330.0180.00519.39
5.4.320.0170.03616.79
5.4.310.0130.03416.83
5.4.300.0150.03116.86
5.4.290.0070.03816.82
5.4.280.0110.04216.79
5.4.270.0120.03516.76
5.4.260.0120.03216.76
5.4.250.0120.03516.80
5.4.240.0140.03616.74
5.4.230.0130.03715.69
5.4.220.0110.03915.71
5.4.210.0150.03515.71
5.4.200.0220.04815.16
5.4.190.0140.03615.68
5.4.180.0160.04015.63
5.4.170.0160.03715.69
5.4.160.0170.03715.71
5.4.150.0140.03815.69
5.4.140.0140.03514.92
5.4.130.0200.04314.91
5.4.120.0140.03314.91
5.4.110.0160.03714.88
5.4.100.0150.03514.87
5.4.90.0140.03514.90
5.4.80.0140.03614.86
5.4.70.0190.03814.85
5.4.60.0170.03214.84
5.4.50.0130.03614.89
5.4.40.0120.03514.83
5.4.30.0150.03314.82
5.4.20.0140.03314.82
5.4.10.0120.03714.87
5.4.00.0230.04014.47
5.3.290.0120.03615.63
5.3.280.0130.03914.85
5.3.270.0180.03814.86
5.3.260.0160.04214.87
5.3.250.0100.03914.89
5.3.240.0160.04214.89
5.3.230.0150.03614.85
5.3.220.0120.03714.83
5.3.210.0150.03914.84
5.3.200.0210.03914.86
5.3.190.0150.04414.86
5.3.180.0170.03314.86
5.3.170.0160.03514.83
5.3.160.0150.04814.83
5.3.150.0170.04014.83
5.3.140.0130.03614.82
5.3.130.0150.03514.81
5.3.120.0140.03814.81
5.3.110.0140.03914.84
5.3.100.0140.04014.43
5.3.90.0200.03514.44
5.3.80.0120.03514.41
5.3.70.0110.03714.40
5.3.60.0140.03514.39
5.3.50.0100.04014.35
5.3.40.0170.03214.35
5.3.30.0120.04414.33
5.3.20.0180.04714.19
5.3.10.0190.03314.16
5.3.00.0130.04014.13

preferences:
146.56 ms | 1394 KiB | 7 Q