当前位置:网站首页>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
边栏推荐
- Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
- 运筹说 第68期|2022年最新影响因子正式发布 快看管科领域期刊的变化
- 【MySQL 使用秘籍】一網打盡 MySQL 時間和日期類型與相關操作函數(三)
- 基于微信小程序的订餐系统
- 53. 最大子数组和:给你一个整数数组 nums ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
- leetcode 10. Regular expression matching regular expression matching (difficult)
- Redis6 data type and operation summary
- go map
- Integer = = the comparison will unpack automatically. This variable cannot be assigned empty
- Matlab paper chart standard format output (dry goods)
猜你喜欢
[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation
Mmseg - Mutli view time series data inspection and visualization
A detailed explanation of ASCII code, Unicode and UTF-8
Data Lake (VII): Iceberg concept and review what is a data Lake
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
FPGA learning notes: vivado 2019.1 add IP MicroBlaze
Interviewer soul torture: why does the code specification require SQL statements not to have too many joins?
About the problem and solution of 403 error in wampserver
MMSeg——Mutli-view时序数据检查与可视化
Usage, installation and use of TortoiseSVN
随机推荐
What are the private addresses
【Hot100】33. Search rotation sort array
kafaka 日志收集
运筹说 第68期|2022年最新影响因子正式发布 快看管科领域期刊的变化
Resttemplate details
"Baidu Cup" CTF competition in September, web:upload
什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
Programmer growth Chapter 8: do a good job of testing
这18个网站能让你的页面背景炫酷起来
jenkins安装
Introduction to Chapter 8 proof problem of njupt "Xin'an numeral base"
南理工在线交流群
Write API documents first or code first?
Go string operation
leetcode 10. Regular expression matching regular expression matching (difficult)
什么是网络端口
Catch all asynchronous artifact completable future
Multi person cooperation project to see how many lines of code each person has written
Backup and restore of Android local SQLite database
What happened to the communication industry in the first half of this year?