3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $_SESSION['flag'] = 0; ?> <html> <head> </head> <body> <!-- page content here --> <?php var_dump($_SESSION['flag']); ?> <?php if ($_SESSION['flag'] === 0): ?> <script src="loggedIn.js"></script> <?php else: ?> <script src="loggedOut.js"></script> <?php endif; ?> </body> </html>

preferences:
42.13 ms | 402 KiB | 5 Q