Home > Article > Backend Development > 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!