ew - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of ew.php

  1. <!Doctype html>
  2. <html>
  3.     <body>
  4.         <table>
  5.            
  6.         <?php
  7.  
  8.            
  9.             $x = 5;
  10.             $y = 10;
  11.             
  12.             echo '1) X = ', $x;
  13.                 echo "<br>";
  14.             echo '2) Y = ', $y;
  15.                 echo "<br>";
  16.         
  17.             echo '3) Sum = ',  $x+$y;
  18.                 echo "<br>";
  19.                 
  20.             echo '4) !Sum = ',  $x-$y;
  21.                 echo "<br>";    
  22.                 
  23.             echo '5) Pow X = ',  pow($x,2);
  24.                 echo "<br>";
  25.             
  26.             echo '6) Pow Y = ',  pow($y,2);
  27.                 echo "<br>";
  28.             
  29.             echo '7) Mult = ', $x*$y;
  30.                 echo "<br>";
  31.             
  32.             echo "8) Devide = ", substr($x/$y,0,5);
  33.                 echo "<br>";
  34.                 
  35.             echo '9) Sqrt x+y = ', substr(sqrt($x+$y),0,5);
  36.                 echo "<br>";
  37.                 
  38.             echo '10) Sqrt x = ', substr(sqrt($x),0,5);
  39.                 echo "<br>";
  40.                 
  41.             echo '11) Sqrt y = ', substr(sqrt($y),0,5);
  42.                 echo "<br>";    
  43.                 
  44.  
  45.         ?>
  46.         </table>
  47.     </body>
  48. </html>
  49. p
  50.  
File Description
  • ew
  • PHP Code
  • 20 Jun-2021
  • 1.13 Kb
You can Share it: