3v4l.org

run code in 300+ PHP versions simultaneously
<?php $NAME = 'foo'; if(empty($NAME)) { echo "<h2>text</h2>\n" ; die ("text."); } ?> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="text"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css.css"> <script src="js.js"></script> <link rel="icon" href="favicon.png"> <title>text</title> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <div class="container"> <div class="starter-template"> <h1> text <?php echo $NAME?></h1> <br> <div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> </div> </div> </div> </div> <?php exec("/var/www/script.sh $NAME"); ?>
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
<html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="text"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css.css"> <script src="js.js"></script> <link rel="icon" href="favicon.png"> <title>text</title> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <div class="container"> <div class="starter-template"> <h1> text foo</h1> <br> <div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> </div> </div> </div> </div> Warning: exec(): Unable to fork [/var/www/script.sh foo] in /in/FXYpi on line 35
Output for 4.3.0, 5.4.43 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.8, 7.4.0
<html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="text"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css.css"> <script src="js.js"></script> <link rel="icon" href="favicon.png"> <title>text</title> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <div class="container"> <div class="starter-template"> <h1> text foo</h1> <br> <div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> </div> </div> </div> </div>
Output for 4.3.1 - 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.42
<html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="text"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css.css"> <script src="js.js"></script> <link rel="icon" href="favicon.png"> <title>text</title> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <div class="container"> <div class="starter-template"> <h1> text foo</h1> <br> <div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> </div> </div> </div> </div> sh: 1: /var/www/script.sh: not found

preferences:
209.48 ms | 405 KiB | 315 Q