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

  1. <?php
  2. /*
  3. $admin;
  4. $name = "ДЖон";
  5. $admin = $name;
  6. echo $admin;
  7. */
  8. /*
  9. $a = 10;
  10. $b = 2;
  11. $sum= $a +$b;
  12. echo " сумма $sum";
  13. */
  14. /*
  15. $a = 17;
  16. $b = 10;
  17. $c = $a - $b;
  18. $d = $c + 7;
  19. echo $d;
  20. */
  21. /*
  22. $d = 7;
  23. echo $d * $d;
  24. */
  25. /*
  26. $a = rand(1, 10);
  27. $b = rand(1, 10);
  28. echo  $a;
  29. echo  $b;
  30. if($a>$b){
  31.     echo " число $a больше за $b";
  32. }
  33. elseif($a<$b){
  34.     echo " число $b больше за $a";
  35. }
  36. else{
  37.     echo "Они одинаковые";
  38. }
  39. */
  40. /*
  41. $a = rand(1, 10);
  42. $b = rand(1, 10);
  43. echo  $a;
  44. echo  $b;
  45. if($a>$b){
  46.     echo " число равны";
  47. }
  48.  
  49. else{
  50.     echo "Упс, числа не равны";
  51. }
  52. */
  53. /*
  54. $a = rand(1, 10);
  55. $b = rand(1, 10);
  56. echo  " $a";
  57. echo  " $b ";
  58. if($a>$b){
  59.     echo $a+$b;
  60. }
  61.  
  62. else{
  63.    echo $a *$b;
  64. }
  65. */
  66. /*
  67. $a = rand(1, 100);
  68. $b = rand(1, 100);
  69. $c = $a + $b;
  70.  
  71. echo  " $с ";
  72. if($c >= 100){
  73.     echo "Число больше 150";
  74. }
  75.  
  76. else{
  77.    echo "Число меньше 100";
  78. }
  79. */
  80. /*
  81. $a = rand(1, 12);
  82. $b = rand(1, 12);
  83.  echo "$a ";
  84.  echo "$b ";
  85. echo  " $с ";
  86. if($a >= 10 and $b >= 10){
  87.     echo "Молодец";
  88. }
  89.  
  90. else{
  91.    echo "Нуб";
  92. }
  93. */
  94.  
  95. $dragon = 300;
  96. if ($dragon >= 100){
  97.     $heads = 3 + (($dragon - 100) * 2);
  98.     $eye = $heads * 2;
  99.     
  100. }
  101. else{
  102.      $heads = 3+ ($dragon *2);
  103.      $eye = $heads * 2;
  104.     
  105. }
  106.  echo " голов $heads глаз  $eye  голов $heads  ";
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
File Description
  • asddddasda
  • PHP Code
  • 22 Feb-2024
  • 1.3 Kb
You can Share it: