PHP Syntax Basics

Source: Internet
Author: User

  1. Class name, function name is case-insensitive

    Variable, constant-differentiated

  2. Weak language:

      1. Shaping, floating point, character, Boolean

      2. Array               

        650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/4D/E6 /wkiol1rcudqrqob5aad3rzodi0i532.jpg "title=" is not named. JPG "alt=" wkiol1rcudqrqob5aad3rzodi0i532.jpg "/>    

        JavaScript can only

        650) this.width=650;" src = "Http://s3.51cto.com/wyfs02/M01/4D/E6/wKioL1RcUJ-SVWIpAADa_wHgj5o096.jpg" title= "is not named. JPG "alt=" wkiol1rcuj-svwipaada_whgj5o096.jpg "/>

      3. Array traversal

        650) this.width=650;" src= "http:/ S3.51cto.com/wyfs02/m00/4d/e8/wkiom1rculrzqqdiaac8szuipjc984.jpg "title=" is not named. JPG "alt=" wkiom1rculrzqqdiaac8szuipjc984.jpg "/>

      4. Null, class, resource

      5. Variable reference $a = & $b;

      6. Static variable

        650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/4D/E8/wKiom1RcVPChlMzTAAFoLZKtI _i796.jpg "title=" is not named. JPG "alt=" wkiom1rcvpchlmztaafolzkti_i796.jpg "/>

  3. Type conversions

  4. Php

String to Number

echo $a + $b;

$a = "123a"; $b = 1; 124

$a = "123"; $b = 1; 124

$a = "a123"; $b = 1; 1


Numeric to String

. operator


Js

Numeric to String

var i = "123a"; var j = 1;

document.write (I+J); string: 123a1

String to Number

parseint ()


5. The assignment operator assigns the value and returns the assigned value

$a = 5;

$b = 10;

$c = ($a = $b);

Echo $c; Ten




6.





PHP Syntax Basics

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.