PHP Summary (i)

Source: Internet
Author: User
 ' 1 ', ' key ' = ' 2 ', an array of 1=>3 */$arr []= "1"; $arr ["Key"]= "2"; $arr []=3;/** * @2 * isset to determine whether a variable exists, or a value of NULL * The first to assign a value to $name, by $name judge, there will be a warning in the course of the assignment */$name =$_get["name"]; if (Isset ($name)) {echo "true";} if (Isset ($_get["name")) {echo "true";}/** * @3 * = = = operator Compare size and type, = = Compare size * Output ==,null and Fals E is equal in the case of = =, when using = = = Unequal/$BL =null; $bol =false; if ($BL = = $bol) {echo "= =";} if ($bl = = = $bol) {echo "= = =";}/** * @4 * Static member variable must have a $ $ symbol * GetName default to a static member method, the difference $this->name  */class user{public static $var =array (1), public $name, function GetName () {Var_dump (self:: $var); }} user::getname (); /** * @5 * $count have an undefined variable warning, but still output 6,for the variable is not part of a local variable. * Default $count is initialized to 0 */for ($i =0; $i <4; $i + +) {$count + = $i;} echo $count; /** * @6 * Two conditions as long as there is a set, the OR operator displays a record * using field = $condition OR $condition = ' ' means that the $condition exists on the filter, does not exist to ignore the condition * in operator is generally used at the end of SQL, Improve efficiency. */$sql = "SELECT * from Persons WHERE (firstname= ' Thomas ' OR firstname= ' William ') and lastname= ' Carter '";? >
  • 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.