3v4l.org

run code in 300+ PHP versions simultaneously
<?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>
Output for git.master, git.master_jit, rfc.property-hooks
<!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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.58 ms | 401 KiB | 8 Q