当前位置:网站首页>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

边栏推荐
- 运筹说 第68期|2022年最新影响因子正式发布 快看管科领域期刊的变化
- Flutter 3.0更新后如何应用到小程序开发中
- Ueditor + PHP enables Alibaba cloud OSS upload
- jasypt配置文件加密|快速入门|实战
- What is a network port
- 龙芯派2代烧写PMON和重装系统
- French scholars: the explicability of counter attack under optimal transmission theory
- Redis6 data type and operation summary
- kafaka 日志收集
- Jenkins installation
猜你喜欢

zabbix 监控

STM32 reverse entry

::ffff:192.168.31.101 是一个什么地址?

Self built shooting range 2022

Fragmented knowledge management tool memos

Binder communication process and servicemanager creation process

Flutter draws animation effects of wave movement, curves and line graphs

Cloudcompare - point cloud slice

RK3566添加LED

Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
随机推荐
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
JS to determine whether an element exists in the array (four methods)
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
leetcode 10. Regular expression matching regular expression matching (difficult)
ZABBIX monitoring
restTemplate详解
These 18 websites can make your page background cool
redis6事务和锁机制
What is a network port
Go array and slice
一网打尽异步神器CompletableFuture
Wonderful express | Tencent cloud database June issue
MATLAB论文图表标准格式输出(干货)
RK3566添加LED
redis6主从复制及集群
Usage, installation and use of TortoiseSVN
Clock cycle
[MySQL usage Script] catch all MySQL time and date types and related operation functions (3)
Record in-depth learning - some bug handling
The "Baidu Cup" CTF competition was held in February 2017, Web: explosion-2