3v4l.org

run code in 300+ PHP versions simultaneously
<form action="check.php" method="post"> <!-- <input type="color" name="dawaj"> --> <input type="number" min="0" max="255" step="1" value="1" name="rR"> <input type="number" min="0" max="255" step="1" value="1" name="gG"> <input type="number" min="0" max="255" step="1" value="1" name="bB"> <input type="submit" name="checkit" value="Check it!"> </form> <?php if(isset($_POST['checkit'])) { $r = $_POST['rR']; $g = $_POST['gG']; $b = $_POST['bB']; $yiq = (($r*299)+($g*587)+($b*114))/1000; if ( $yiq >= 128 ) { echo'<font style="color:black;">Black</font>'; } else { echo'<font style="color:white;">White</font>'; } /*$color = $_POST['dawaj']; $colorcheck=strtolower($color[3]); if($colorcheck>6||is_numeric($colorcheck)===false) echo'<font style="color:black;">Black</font>'; else echo'<font style="color:white;">White</font>';*/ } ?> <style> body { // background-color:rgb(255,0,255); background-color: rgb(<?php echo $r ?>,<?php echo $g ?>,<?php echo $b ?>); color: <?php echo $color; ?>; } </style>
Output for git.master, git.master_jit, rfc.property-hooks
<form action="check.php" method="post"> <!-- <input type="color" name="dawaj"> --> <input type="number" min="0" max="255" step="1" value="1" name="rR"> <input type="number" min="0" max="255" step="1" value="1" name="gG"> <input type="number" min="0" max="255" step="1" value="1" name="bB"> <input type="submit" name="checkit" value="Check it!"> </form> <style> body { // background-color:rgb(255,0,255); background-color: rgb( Warning: Undefined variable $r in /in/4gTNO on line 38 , Warning: Undefined variable $g in /in/4gTNO on line 38 , Warning: Undefined variable $b in /in/4gTNO on line 38 ); color: Warning: Undefined variable $color in /in/4gTNO on line 39 ; } </style>

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:
36.76 ms | 402 KiB | 8 Q