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

  1. <?php
  2. //однострочный комментарий
  3.  
  4. /* многострочный комментарий 
  5. */
  6. /*переменные нач-ся с $ обязательно!!! 
  7. далее буква затем подчеркивание-буква-цифра в любом порядке
  8. есть ЧУСТВИТЕЛЬНОСТЬ к РЕГИСТРУ 
  9. кроме ключевых слов и имен функций
  10. $_nnn - системная переменная ОПАСНО
  11. !!! русские буквы в идентификаторах не использовать
  12. SQL-не отработает
  13. */
  14. /*
  15. $x=2;
  16. gettype($x);
  17. echo gettype($x);
  18. $a=5;//5
  19. $a++;//6
  20. ++$a;//7
  21. echo ++$a;//8
  22. $a--;
  23. echo $a;
  24.  
  25. $a=7;
  26. $a+=10;//+10 
  27. $b=17;
  28. echo ($a==$b);//1-true
  29. */
  30. $name='Sveta';
  31. echo 'My name is '.$name;
  32. echo "<br>";
  33. echo 'My name is '.$name;
  34.  
  35.  
  36.  
  37.  
  38. ?>
  39.  
File Description
  • Var_php
  • PHP Code
  • 06 Sep-2023
  • 842 Bytes
You can Share it: