tailieunhanh - PHP Developer's Dictionary- P39

PHP Developer's Dictionary- P39:PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP brings together the best of Perl, C++, and other languages. | PHP Developer s Dictionary int is_string mixed var Description The is_string function returns true if var is a string and returns false otherwise. isset Syntax int isset mixed var Description The isset function returns true if var exists and returns false otherwise. avar 100 echo isset avar displays 1 print_r Syntax void print_r mixed expression Description The print_r function which was added in PHP displays human-readable information about the values of variables. If expression is a string integer or double the value itself will be printed. If expression is an array the keys and values will be displayed. Similar notation is used for objects. array1 array 1 2 3 print_r array1 displays Array 0 1 1 2 2 3 settype IT-SC book 190 PHP Developer s Dictionary Syntax int settype string var string type Description The settype function sets the type of var to that of type . Possible values of type are integer double string array and object . The return value is true if the type could be set and false otherwise. strval Syntax string strval mixed var Description The strval function returns the string representation of var . var must be a scalar type and not an array or object. unset Syntax int unset mixed var Description The unset function destroys the specified variable and returns true. var_dump Syntax void var_dump mixed expression Description IT-SC book 191 PHP Developer s Dictionary The var_dump function which was added in PHP and PHP displays structured information about an expression including its type and value. Arrays are processed recursively with values indented to show structure. array1 array 1 2 3 var_dump array1 displays array 3 0 int 1 1 int 2 2 int 3 IT-SC book .