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.
Result of php executing
Full code of trtr.php
- <?php
- $a=3;
- $b=7;
- echo $a+$b;
- ?>
- <?php
- $a = 10;
- $b = 2;
- echo $a+$b;
- echo $a-$b;
- echo $a*$b;
- echo $a/$b;
- ?>
- <?php
- $a=3;
- echo $a;
- ?>
- <?php
- $c=15;
- $d=2;
- $result=$c+$d;
- echo $result
- ?>
- <?php
- $a=10;
- $b=2;
- $c=5;
- echo $a+$b+$c
- ?>
- <?php
- $a=17;
- $b=10;
- $c=$a-$b;
- $d=7;
- $result=$c+$d;
- echo $result
- ?>
- <?php
- $text="Привет, Мир!";
- echo $text
- ?>
- <?php
- $text1="Привет, ";
- $text2="Мир!";
- echo $text1;
- echo $text2;
- ?>
- <?php
- $name="Gleb!";
- $text="Привет, ";
- echo $text;
- echo $name;
- ?>
- <?php
- $age="18";
- $text1="Мне ";
- $text2=" лет!";
- echo $text1;
- echo $age;
- echo $text2;
- ?>
- <?php
- $text="abcde";
- echo $text[0];
- echo $text[3];
- echo $text[4];
- ?>
- <?php
- $num="12345"
- $n=$num[0]