Home > Backend Development > PHP Problem > Is js syntax the same as php?

Is js syntax the same as php?

王林
Release: 2023-02-26 21:44:02
Original
3159 people have browsed it

Is js syntax the same as php?

1. The basic types of PHP:

1. Basic data types: integer, decimal (float/double), string , Boolean type

2. Composite type: array, object

3. Special type: Null, resource type

Basic types of JavaScript: Undefined, Null, Boolean, Number and String.

Difference: PHP has resource types, decimals are divided into single and double precision, while the number type of JS is only Number, and there is Undefined type.

2. String connector

The string connector of php is: " . "
The string connector of Js is: " "

3. Case sensitivity

php: Only variable names are case-sensitive
Js: All are case-sensitive

4. Undefined variables

php: is of null type.
Js: For undefined type

Recommended tutorial: PHP video tutorial

The above is the detailed content of Is js syntax the same as php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template