PHP Basics. The difference between PHP and JS

Source: Internet
Author: User
Tags php basics php error

1. PHP uses a dot for a spelling string.

JS with a + number.

2. PHP files to be placed in the Wamp file inside the www.

3. PHP and JS are embedded in the same way, but the embedded tag is not the same.

4. PHP output syntax with ECHO. You can output multiple strings. The special output method is Var_dump ().

5. PHP defines a variable with a $.

6. PHP Special definition Way $ variable =<<<a

A

Be aware that the following a should be shelf written.

7. echo "he" \llo "PHP parsing escaped double quotes Yes, single quotes not available."

8. PHP casts strings string for example $a = (string) $a;

Settype ($a, "string");

9.   PHP variable common function unset ($a); Delete a variable
Var_dump (Isset ($a)); Determine whether a variable exists;
Var_dump (Empty ($a)); The judgment is empty, the variable does not exist, the variable is equal to zero, the empty string is empty

10.   PHP variable take address & represent variable take address for example: $a = 10;   $b =& $a;     Echo $b; So the output variable is 10

11.    PHP mutable variables such as $a = "Hello";   $hello = "Zhang San";    echo $ $a; This output is Zhang San

12. PHP inside @ stands for suppress error symbol

13. $a = 10;
echo $a ==10? " OK ":" NO ";

Trinocular operator

14. PHP Error Tip: Notice alert Warning Warning Error

PHP Basics. The difference between PHP and JS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.