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>
Output for 4.3.0 - 4.3.6, 4.3.9 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.25, 7.4.33, 8.0.0 - 8.0.13, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<!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/> </body> </html>
Output for 8.0.14 - 8.0.30, 8.1.0 - 8.1.28
<!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/> Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /in/54GGc:17 Stack trace: #0 {main} thrown in /in/54GGc on line 17
Process exited with code 255.
Output for 7.4.26 - 7.4.32
<!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/> Warning: count(): Parameter must be an array or an object that implements Countable in /in/54GGc on line 17 Notice: Trying to access array offset on value of type bool in /in/54GGc on line 18 <a href=" Notice: Trying to access array offset on value of type bool in /in/54GGc on line 27 " target="_blank"> Notice: Trying to access array offset on value of type bool in /in/54GGc on line 27 (0 MB - kb. 0 perc)</a> Warning: count(): Parameter must be an array or an object that implements Countable in /in/54GGc on line 28 Warning: count(): Parameter must be an array or an object that implements Countable in /in/54GGc on line 17 </body> </html>
Output for 4.3.7 - 4.3.8
<!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/> <a href="" target="_blank"> (0 MB - kb. 0 perc)</a> </body> </html>

preferences:
282.62 ms | 402 KiB | 468 Q