Android programmers learn PHP development (6)-string array object resources-PhpStorm

Source: Internet
Author: User
The var_dump () method is really useful. Simply put, the var_dump () method returns the data type and value of the variable. The var_dump () method is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, it is the value of the variable and returns the data type. this function displays the structure information about one or more expressions, including the expression type and value. The array recursively expands the value and displays its structure through indentation. The var_dump () method is really useful.
Simply put, the var_dump () method returns the data type and value of the variable.
The var_dump () method is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, it is the value of the variable and returns the data type. this function displays the structure information about one or more expressions, including the expression type and value. The array recursively expands the value and displays its structure through indentation.

 Int (1) [1] => int (2) [2] => int (3) [3] => int (4) [4] => int (5)}/*** Object */class Person {var $ name; var $ age; var $ sex; function say () {} function eat () {}}$ person = new Person (); // object (Person) #1 (3) {["name"] => NULL ["age"] => NULL ["sex"] => NULL} $ person2 = new Person (); // object (Person) #2 (3) {["name"] => NULL ["age"] => NULL ["sex"] => NULL}/*** resource * OK .txt needs to be placed in the directory of the current php * If the content in the text is a Chinese encoding format, use the UTF-8 * when saving the txt file, you can see the encoding option */$ file = fopen ("OK .txt ", "r"); // The content of OK .txt is displayed now // if (NULL = "OK .txt") {// printf ("does not exist
"); //} Else {// printf (" exists
"); //} Echo $ int; echo"
"; Echo $ str2; echo"
"; Echo $ str3; echo"
"; Echo $ str4; echo"
"; Echo $ str5; echo"
"; Echo $ str6; echo"
"; // Echo $ str7; echo"
"; Echo $ str8; echo"
"; Echo $ str9; echo"
"; Echo $ str10; echo"
"; Var_dump ($ arr); echo"
"; Var_dump ($ person); echo"
"; Var_dump ($ person2); echo"
"; Echo fread ($ file, filesize (" OK .txt "); echo"
"; Fclose ($ file); // release resources

The above is the content of PHP Development (6)-string array object resource-PhpStorm for Android programmers. For more information, see PHP Chinese website (www.php1.cn )!

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.