3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> <?php $movie = $_GET ["film"]; $info = file($movie . "/info.txt"); $rating = get_rating($info[2]); function get_rating($number){ if ($number >= 60){ return "Fresh"; } else{ return "Rotten"; } } ?> <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> <?php $overview = file($movie . "/overview.txt"); foreach($overview as $line){ list($heading, $details) = explode(":", $line) ?> <dt><?= $heading ?></dt> <dd><?= $details ?> </dd> <?php } ?> </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> <?php $count = 0; $files = glob($movie . "/review*.txt"); $number = count($files); foreach($files as $reviews){ list($review, $freshness, $name, $publication) = $reviews; ?> <p> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $freshness ?>.gif" alt="<?= $freshness ?>" /> <q><?= $review ?></q> </p> <p> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/critic.gif" alt="Critic" /> $<?= $name ?><br /> <span class="publication"><?= $publication ?></span> </p> <?php $count++; if($count >= $number/2){ ?> </div> <div class="column"> <?php } ?> <?php } ?> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
based on ffG6m
Output for 7.0.0 - 7.1.0
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Fatal error: Uncaught Error: Function name must be a string in /in/cBbEv:35 Stack trace: #0 {main} thrown in /in/cBbEv on line 35
Process exited with code 255.
Output for 5.4.0 - 5.6.28
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Fatal error: Function name must be a string in /in/cBbEv on line 35
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> Warning: file(/overview.txt): failed to open stream: No such file or directory in /in/cBbEv on line 45 Warning: Invalid argument supplied for foreach() in /in/cBbEv on line 46 </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
Output for 4.3.2 - 4.3.6, 4.3.9 - 4.3.10, 4.4.0 - 5.2.17
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> Warning: file(/overview.txt): failed to open stream: No such file or directory in /in/cBbEv on line 45 Warning: Invalid argument supplied for foreach() in /in/cBbEv on line 46 </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
Output for 4.3.11
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> Warning: file(/overview.txt): failed to open stream: No such file or directory in /in/cBbEv on line 45 </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
Output for 4.3.7 - 4.3.8
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt): failed to open stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> Warning: file(/overview.txt): failed to open stream: No such file or directory in /in/cBbEv on line 45 Warning: Invalid argument supplied for foreach() in /in/cBbEv on line 46 </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> Warning: Invalid argument supplied for foreach() in /in/cBbEv on line 68 </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>
Output for 4.3.0 - 4.3.1
<!DOCTYPE html> <html lang=en> <!-- Eitan Zinberg: This file contains text for review of TMNT. It is linked to a css document that formats it. --> <head> <title>Rancid Tomatoes</title> <meta charset="utf-8" /> <link href="movie.css" type="text/css" rel="stylesheet" /> <link href="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/rotten.gif" type="image/gif" rel="shortcut icon" /> </head> <body> Notice: Undefined index: film in /in/cBbEv on line 17 Warning: file(/info.txt) [http://www.php.net/function.file]: failed to create stream: No such file or directory in /in/cBbEv on line 18 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1><?= $info[0] ($info[1]) ?></h1> <div id="content"> <div id="overview"> <div> <img src="<?= $movie ?>/overview.png" alt="general overview" /> </div> <dl> Warning: file(/overview.txt) [http://www.php.net/function.file]: failed to create stream: No such file or directory in /in/cBbEv on line 45 Warning: Invalid argument supplied for foreach() in /in/cBbEv on line 46 </dl> </div> <div id="reviews"> <div id="rating"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/<?= $rating ?>big.png" alt="<?= $rating ?>" /> <span><?= $info[2] ?>%</span> </div> <div class="column"> </div> <footer><span>(1- <?= $number ?> ) of <?= $number ?></span></footer> </div> <div id="validator"> <a href="http://validator.w3.org/check/referer"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-html.png" alt="Valid HTML5"></a> <br/> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"><img src="http://ycfac197.mc.yu.edu/COM3780/icons/w3c-css.png" alt="Valid CSS"></a> </div> </body> </html>