当前位置:网站首页>PHP basic syntax
PHP basic syntax
2022-07-05 13:43:00 【Sex sex ~ ~】
One 、 initial PHP Script program
1.PHP Language marks
1)PHP Start marker :<?php
2)PHP End mark :?>
3) Our page is finally through html,css,js To show a gorgeous interface
4)PHP Code can be embedded in html Anywhere in the code , And can embed any number of
5) The end of the file "?>" The end flag can be omitted
2 . Instruction separator ";"
1) In some PHP Add... At the end of the statement ";" It means the end of a sentence , Of course, you don't need to miss the semicolon , The program can't be executed at all , Will report a mistake .
2) End mark "?>" It implies a “;” So in "?>" Previous PHP Statements can be omitted ";"
3. notes
1) Multiline comment
/* Things that need annotation */
2) Single-line comments
// Things that need annotation
Two 、 Variable ( A container for temporarily storing data )
1、 Declaration of variables
C Language must define variables at the beginning of the code , Is a declaration , And in the PHP In the program , Variables do not need to be declared before they are used .(“=” stay php It also means assignment )
2. Destruction of variables
unset ($ Variable name )
3. Naming rules for variables
1) Variable names are strictly capitalized
$name, $NANE, $Name It's all different variables
2) Only start with letters or underscores
* Variable names can only contain Letter Numbers Underline And must start with a letter or underscore
4. Volatile variables

5. Reference assignment of variable

边栏推荐
- 内网穿透工具 netapp
- Require, require in PHP_ once、include、include_ Detailed explanation of the efficiency of repeated introduction of once class library
- 【Hot100】33. Search rotation sort array
- FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze
- Redis6 data type and operation summary
- Matlab paper chart standard format output (dry goods)
- Intranet penetration tool NetApp
- JS to determine whether an element exists in the array (four methods)
- [MySQL usage Script] catch all MySQL time and date types and related operation functions (3)
- These 18 websites can make your page background cool
猜你喜欢

Data Lake (VII): Iceberg concept and review what is a data Lake

Write API documents first or code first?

FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze

ELFK部署

NFT value and white paper acquisition

stm32逆向入门
![[public class preview]: basis and practice of video quality evaluation](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[public class preview]: basis and practice of video quality evaluation

When using Tencent cloud for the first time, you can only use webshell connection instead of SSH connection.

redis6事务和锁机制

STM32 reverse entry
随机推荐
Personal component - message prompt
法国学者:最优传输理论下对抗攻击可解释性探讨
What happened to the communication industry in the first half of this year?
"Baidu Cup" CTF competition in September, web:upload
Win10 - lightweight gadget
jenkins安装
Jasypt configuration file encryption | quick start | actual combat
C object storage
不知道这4种缓存模式,敢说懂缓存吗?
【Hot100】33. Search rotation sort array
PostgreSQL Usage Summary (PIT)
Jetpack Compose入门到精通
The real king of caching, Google guava is just a brother
MySQL get time
ETCD数据库源码分析——rawnode简单封装
Redis6 transaction and locking mechanism
通讯录(链表实现)
Cloudcompare - point cloud slice
Internal JSON-RPC error. {"code":-32000, "message": "execution reverted"} solve the error
如何把大的‘tar‘存档文件分割成特定大小的多个文件