PHP Online Compiler
Example: PHP Code to Convert Celsius to Fahrenheit
C
C++
C#
Java
Python
PHP
main.php
STDIN
Run
<?php // PHP Code to Convert Celsius to Fahrenheit $c = 7; // value of the celsius $f = NULL; // value of the fahrenheit // It will convert celsius to Fahrenheit $f = (float)(($c * 9 / 5) + 32); // It will print the final output printf($c . " Celsius = " . $f . " Fahrenheit"); ?>
Output
Clear
ADVERTISEMENTS