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

  1. <?php
  2.         $a=3;
  3.         $b=7;
  4.         echo $a+$b;
  5. ?>
  6.  
  7. <?php
  8.         $a = 10;
  9.         $b = 2;
  10.         echo $a+$b;
  11.         echo $a-$b;
  12.         echo $a*$b;
  13.         echo $a/$b;
  14. ?>
  15.  
  16. <?php
  17.         $a=3;
  18.         echo $a;
  19. ?>
  20.  
  21. <?php
  22.         $c=15;
  23.         $d=2;
  24.         $result=$c+$d;
  25.         echo $result
  26. ?>
  27.  
  28. <?php
  29.         $a=10;
  30.         $b=2;
  31.         $c=5;
  32.         echo $a+$b+$c 
  33. ?>
  34.        
  35. <?php
  36.         $a=17;
  37.         $b=10;
  38.         $c=$a-$b;
  39.         $d=7;
  40.         $result=$c+$d;
  41.         echo $result
  42. ?>
  43.  
  44. <?php
  45.         $text="Привет, Мир!";
  46.         echo $text
  47. ?>
  48.  
  49. <?php
  50.     $text1="Привет, ";
  51.     $text2="Мир!";
  52.     echo $text1;
  53.     echo $text2;
  54. ?>
  55.  
  56. <?php
  57.     $name="Gleb!";
  58.     $text="Привет, ";
  59.     echo $text;
  60.     echo $name;
  61. ?>
  62.  
  63. <?php
  64.     $age="18";
  65.     $text1="Мне ";
  66.     $text2=" лет!";
  67.     echo $text1;
  68.     echo $age;
  69.     echo $text2;
  70. ?>
  71.     
  72. <?php
  73.     $text="abcde";
  74.     echo $text[0];
  75.     echo $text[3];
  76.     echo $text[4];
  77. ?>
  78.  
  79. <?php
  80.     
  81.     
  82.     
  83.     
  84.     
  85.  
  86.  
File Description
  • trtr
  • PHP Code
  • 25 Sep-2020
  • 802 Bytes
You can Share it: