3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>prob&aacute;k, felv&eacute;telek</title> </head> <body> <br/> <?php $mbsize = 0; $minutes = 0; $wholeMinutes = 0; $restOfMinutes = 0; $filepath = '*.mp3'; $picarray = glob($filepath); for ($i=0; $i<count($picarray); $i++): $mbsize = round(filesize($picarray[$i])/1024/1024,1); $minutes = round($mbsize/.686); if ($minutes > 60): $wholeMinutes = floor($minutes/60); $restOfMinutes = $minutes - ($wholeMinutes * 60); $showMinutes = $wholeMinutes.' &oacute;ra '.$restOfMinutes; else: $showMinutes = $minutes; endif; ?> <a href="<?php echo $picarray[$i]; ?>" target="_blank"><?php echo $picarray[$i]; ?> (<?php echo $mbsize; ?> MB - kb. <?php echo $showMinutes; ?> perc)</a> <?php if ($i < count($picarray)-1) echo '<br/><br/>'; ?> <?php endfor; ?> </body> </html>

preferences:
57.22 ms | 402 KiB | 5 Q