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 )!