3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f=$c= ""; if(isset($_POST['f'])) $f=sanitizeString($_POST['f']); if(isset($_POST['c'])) $c=sanitizeString($_POST['c']); if($f!= '') { $c=intval((5/9)*($f-32)); $out="$f degree farenheit equals $c degree celsius"; } elseif($c!= '') { $f=intval((9/5)* $c + 32); $out="$c degree celsius equals $f degree farenheit"; } else $out= ""; echo <<<_END <html><head><title>Temparature Converter</title> </head><body><pre> Enter either Fahrenheit or Celsius and click on Convert <b>$out</b> <form method="post" action="convert.php"> Fahrenheit <input type="text" name="f" size="7"/> Celsius <input type="text" name="c" size="7"/> <input type="submit" value="convert" /> </form> </pre> </body> </html> _END; function sanitizeString($var) { $var=stripslashes($var); $var=htmlentities($var); $var=strip_tags($var); return $var; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
<html><head><title>Temparature Converter</title> </head><body><pre> Enter either Fahrenheit or Celsius and click on Convert <b></b> <form method="post" action="convert.php"> Fahrenheit <input type="text" name="f" size="7"/> Celsius <input type="text" name="c" size="7"/> <input type="submit" value="convert" /> </form> </pre> </body> </html>

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:
42.87 ms | 401 KiB | 8 Q