four output values php

// echo depth understanding of echo, echo is a function 
// echo function: output one or more strings to the browser; 
// echo return value: void no return value; 
 
    echo "Today is a good weather"; 
 
// Print function : output string to the browser 
// print returns: integer 1 
// example below: print speak string printed out, echo in turn print the return value printed 
    echo (print ( "today is a good weather")) ; 
 
// echo runs slightly faster than the print, since it has no return value 
 
// print_r () displays information about readily appreciated that a variable. If the given string, integer, or float, the value of the variable print itself. If a given array, and the key element will be displayed according to a certain format. object like arrays 
// e.g. 
    $ A = [1,2,3,4,]; 
    print_r ($ A); 
 
// var_dump () shows the structure of information about one or more expressions, including expression of type value. Recursively expand the array values, indented by its structure. 
 
// For example: 
    $ Array B = (. 1, 2, Array ( "A", "B", "C")); 
    var_dump ($ B); 
 
// For example: 
    $ D = 3.1; 
    $ C = to true;
    var_dump ($ d, $ c)

  

Guess you like

Origin www.cnblogs.com/chenguanai/p/11287076.html