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

Is js syntax the same as php?

王林
王林Original
2019-10-16 16:10:393119browse

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!

Statement:
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