Test KIM - 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 Test KIM.php

  1. <?php
  2. class Figure {
  3.     function getMessage() {
  4.         return "this._class";
  5.     }
  6. }
  7.  
  8. class Circle extends Figure {
  9.  
  10. }
  11.  
  12. class Square extends Figure {
  13.  
  14. }
  15.  
  16.  
  17.  
  18.  
  19.  
  20. $circle = new Circle(10);
  21. echo($circle->getMessage()); // Output: Area of Circle is 314
  22.  
  23.  
  24. $square = new Square(5);
  25. echo($square->getMessage()); // Output: Area of Square is 25
  26.  
  27.  
  28. //$triangle = new Triangle(5, 4);
  29. //echo($square->getMessage()); // Output: Area of Triangle is 10
File Description
  • Test KIM
  • PHP Code
  • 23 Mar-2021
  • 436 Bytes
You can Share it: