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.
Result of php executing
Full code of Var_php.php
- <?php
- //однострочный комментарий
- /* многострочный комментарий
- */
- /*переменные нач-ся с $ обязательно!!!
- далее буква затем подчеркивание-буква-цифра в любом порядке
- есть ЧУСТВИТЕЛЬНОСТЬ к РЕГИСТРУ
- кроме ключевых слов и имен функций
- $_nnn - системная переменная ОПАСНО
- !!! русские буквы в идентификаторах не использовать
- SQL-не отработает
- */
- /*
- $x=2;
- gettype($x);
- echo gettype($x);
- $a=5;//5
- $a++;//6
- ++$a;//7
- echo ++$a;//8
- $a--;
- echo $a;
- $a=7;
- $a+=10;//+10
- $b=17;
- echo ($a==$b);//1-true
- */
- $name='Sveta';
- echo 'My name is '.$name;
- echo "<br>";
- echo 'My name is '.$name;
- ?>