<?php
?>
<!DOCTYPE>
<html>
<body>
<?php if(round > 0 && $guess == $number) : ?>
<h1>[game <?php echo $last_round?> result]</h1>
<br>
user guessed <?php echo $guess;?>, the number was <?php echo $number;?> and the number <?php echo $number;?> came up
<br>
user got a win
<?php else : ?>
<h1>[game <?php echo $round?> result]</h1>
user guessed <?php echo $guess;?>, the number was <?php echo $number;?> and the number <?php echo $number;?> came up
<br>
user got a loss
<?php endif; ?>
<br>
<a href="reset.php">reset</a>
<br>
<h2>current score</h2>
<br>
<table>
<tr><td>user</td><td><?php echo $scoreU;?></td></tr>
<tr><td>computer</td><td><?php echo $scoreC;?></td></tr>
</table>
<br>
<br>
<h1>[game<?php echo $round;?>]</h1>
<br>
<h3>the next random number from 0-10 will be</h3>
<br>
<?php if(round/5 == 0) : ?>
exactly <input type="text" name="guess">
<?php else : ?>
<input type="button" name="higher"> higher than <?php ?>
<input type="button" name="lower"> lower than <?php ?>
<?php endif; ?>
<button type="submit">make your guess</button>
</body>
</html>
<!DOCTYPE>
<html>
<body>
Fatal error: Uncaught Error: Undefined constant "round" in /in/kga7f:8
Stack trace:
#0 {main}
thrown in /in/kga7f on line 8
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<!DOCTYPE>
<html>
<body>
Fatal error: Uncaught Error: Undefined constant "round" in /in/kga7f:8
Stack trace:
#0 {main}
thrown in /in/kga7f on line 8
Process exited with code 255.
<!DOCTYPE>
<html>
<body>
Warning: Use of undefined constant round - assumed 'round' (this will throw an Error in a future version of PHP) in /in/kga7f on line 8
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 15
result]</h1>
user guessed
Notice: Undefined variable: guess in /in/kga7f on line 16
, the number was
Notice: Undefined variable: number in /in/kga7f on line 16
and the number
Notice: Undefined variable: number in /in/kga7f on line 16
came up
<br>
user got a loss
<br>
<a href="reset.php">reset</a>
<br>
<h2>current score</h2>
<br>
<table>
<tr><td>user</td><td>
Notice: Undefined variable: scoreU in /in/kga7f on line 27
</td></tr>
<tr><td>computer</td><td>
Notice: Undefined variable: scoreC in /in/kga7f on line 28
</td></tr>
</table>
<br>
<br>
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 34
]</h1>
<br>
<h3>the next random number from 0-10 will be</h3>
<br>
Warning: Use of undefined constant round - assumed 'round' (this will throw an Error in a future version of PHP) in /in/kga7f on line 39
Warning: A non-numeric value encountered in /in/kga7f on line 39
exactly <input type="text" name="guess">
<button type="submit">make your guess</button>
</body>
</html>
Output for 7.3.32 - 7.3.33
<!DOCTYPE>
<html>
<body>
Warning: Use of undefined constant round - assumed 'round' (this will throw an Error in a future version of PHP) in /in/kga7f on line 8
<h1>[game result]</h1>
user guessed , the number was and the number came up
<br>
user got a loss
<br>
<a href="reset.php">reset</a>
<br>
<h2>current score</h2>
<br>
<table>
<tr><td>user</td><td></td></tr>
<tr><td>computer</td><td></td></tr>
</table>
<br>
<br>
<h1>[game]</h1>
<br>
<h3>the next random number from 0-10 will be</h3>
<br>
Warning: Use of undefined constant round - assumed 'round' (this will throw an Error in a future version of PHP) in /in/kga7f on line 39
Warning: A non-numeric value encountered in /in/kga7f on line 39
exactly <input type="text" name="guess">
<button type="submit">make your guess</button>
</body>
</html>
Output for 7.1.0 - 7.1.33
<!DOCTYPE>
<html>
<body>
Notice: Use of undefined constant round - assumed 'round' in /in/kga7f on line 8
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 15
result]</h1>
user guessed
Notice: Undefined variable: guess in /in/kga7f on line 16
, the number was
Notice: Undefined variable: number in /in/kga7f on line 16
and the number
Notice: Undefined variable: number in /in/kga7f on line 16
came up
<br>
user got a loss
<br>
<a href="reset.php">reset</a>
<br>
<h2>current score</h2>
<br>
<table>
<tr><td>user</td><td>
Notice: Undefined variable: scoreU in /in/kga7f on line 27
</td></tr>
<tr><td>computer</td><td>
Notice: Undefined variable: scoreC in /in/kga7f on line 28
</td></tr>
</table>
<br>
<br>
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 34
]</h1>
<br>
<h3>the next random number from 0-10 will be</h3>
<br>
Notice: Use of undefined constant round - assumed 'round' in /in/kga7f on line 39
Warning: A non-numeric value encountered in /in/kga7f on line 39
exactly <input type="text" name="guess">
<button type="submit">make your guess</button>
</body>
</html>
<!DOCTYPE>
<html>
<body>
Notice: Use of undefined constant round - assumed 'round' in /in/kga7f on line 8
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 15
result]</h1>
user guessed
Notice: Undefined variable: guess in /in/kga7f on line 16
, the number was
Notice: Undefined variable: number in /in/kga7f on line 16
and the number
Notice: Undefined variable: number in /in/kga7f on line 16
came up
<br>
user got a loss
<br>
<a href="reset.php">reset</a>
<br>
<h2>current score</h2>
<br>
<table>
<tr><td>user</td><td>
Notice: Undefined variable: scoreU in /in/kga7f on line 27
</td></tr>
<tr><td>computer</td><td>
Notice: Undefined variable: scoreC in /in/kga7f on line 28
</td></tr>
</table>
<br>
<br>
<h1>[game
Notice: Undefined variable: round in /in/kga7f on line 34
]</h1>
<br>
<h3>the next random number from 0-10 will be</h3>
<br>
Notice: Use of undefined constant round - assumed 'round' in /in/kga7f on line 39
exactly <input type="text" name="guess">
<button type="submit">make your guess</button>
</body>
</html>