121 - 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 121.php

  1. <?php
  2.  
  3. class SimpleCalc
  4. {
  5.     public static function add(float $one, float $two): float
  6.     {return $one + $two;}
  7.  
  8.     public static function multiply(float $one, float $two): float
  9.     {return $one * $two;}
  10.  
  11.     public static function substract(float $one, float $two): float
  12.     {return $one - $two;}
  13.  
  14.     public static function divide(float $one, float $two): float
  15.     {return round($one / $two, 2);}
  16. }
File Description
  • 121
  • PHP Code
  • 29 Apr-2022
  • 421 Bytes
You can Share it: