3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_SESSION['logged_on'] = false; $_SESSION['username'] = 'username'; if (empty($_SESSION['logged_on']) || empty($_SESSION['username'])) { echo 'not logged in code would stop running here if there was a die'; } $_SESSION['logged_on'] = true; $_SESSION['username'] = 'username'; if (empty($_SESSION['logged_on']) || empty($_SESSION['username'])) { echo 'also not logged in code would stop running here if there was a die'; }
Output for 4.3.0 - 7.2.0
not logged in code would stop running here if there was a die