3v4l.org

run code in 300+ PHP versions simultaneously
<!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>
Output for 8.3.0 - 8.3.6
<!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> Warning: Undefined array key "film" in /in/cBbEv on line 17 Warning: file(): open_basedir restriction in effect. File(/info.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/cBbEv on line 18 Warning: file(/info.txt): Failed to open stream: Operation not permitted in /in/cBbEv on line 18 Warning: Trying to access array offset on false in /in/cBbEv on line 19 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Warning: Trying to access array offset on false in /in/cBbEv on line 35 Fatal error: Uncaught Error: Value of type null is not callable in /in/cBbEv:35 Stack trace: #0 {main} thrown in /in/cBbEv on line 35
Process exited with code 255.
Output for 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
<!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> Warning: Undefined array key "film" in /in/cBbEv on line 17 Warning: file(): open_basedir restriction in effect. File(/info.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/cBbEv on line 18 Warning: file(/info.txt): Failed to open stream: Operation not permitted in /in/cBbEv on line 18 Warning: Trying to access array offset on value of type bool in /in/cBbEv on line 19 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Warning: Trying to access array offset on value of type bool in /in/cBbEv on line 35 Fatal error: Uncaught Error: Value of type null is not callable in /in/cBbEv:35 Stack trace: #0 {main} thrown in /in/cBbEv on line 35
Process exited with code 255.
Output for 8.0.0 - 8.0.13
<!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> Warning: Undefined array key "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 Warning: Trying to access array offset on value of type bool in /in/cBbEv on line 19 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Warning: Trying to access array offset on value of type bool in /in/cBbEv on line 35 Fatal error: Uncaught Error: Value of type null is not callable in /in/cBbEv:35 Stack trace: #0 {main} thrown in /in/cBbEv on line 35
Process exited with code 255.
Output for 7.4.33
<!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 Notice: Trying to access array offset on value of type bool in /in/cBbEv on line 19 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Notice: Trying to access array offset on value of type bool in /in/cBbEv on line 35 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 7.4.26 - 7.4.32
<!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(): open_basedir restriction in effect. File(/info.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/cBbEv on line 18 Warning: file(/info.txt): failed to open stream: Operation not permitted in /in/cBbEv on line 18 Notice: Trying to access array offset on value of type bool in /in/cBbEv on line 19 <div id="banner"> <img src="http://ycfac197.mc.yu.edu/COM3780/12fa/homework/2/banner.png" alt="Rancid Tomatoes" /> </div> <h1> Notice: Trying to access array offset on value of type bool in /in/cBbEv on line 35 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 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
<!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> 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.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
<!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> 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.2.3 - 5.2.17, 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> 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.4.3 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<!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> <br /> <b>Warning</b>: file(/info.txt) [<a href='function.file'>function.file</a>]: failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>18</b><br /> <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> <br /> <b>Warning</b>: file(/overview.txt) [<a href='function.file'>function.file</a>]: failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>45</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/cBbEv</b> on line <b>46</b><br /> </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 - 4.4.2
<!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> <br /> <b>Warning</b>: file(/info.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>18</b><br /> <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> <br /> <b>Warning</b>: file(/overview.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>45</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/cBbEv</b> on line <b>46</b><br /> </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> <br /> <b>Warning</b>: file(/info.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>18</b><br /> <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> <br /> <b>Warning</b>: file(/overview.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>45</b><br /> </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> <br /> <b>Warning</b>: file(/info.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>18</b><br /> <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> <br /> <b>Warning</b>: file(/overview.txt): failed to open stream: No such file or directory in <b>/in/cBbEv</b> on line <b>45</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/cBbEv</b> on line <b>46</b><br /> </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"> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/cBbEv</b> on line <b>68</b><br /> </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> <br /> <b>Warning</b>: file(/info.txt) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to create stream: No such file or directory in <b>/in/cBbEv</b> on line <b>18</b><br /> <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> <br /> <b>Warning</b>: file(/overview.txt) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to create stream: No such file or directory in <b>/in/cBbEv</b> on line <b>45</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/cBbEv</b> on line <b>46</b><br /> </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>

preferences:
301.57 ms | 405 KiB | 468 Q