The difference between echo, print and print pur


1. Echo can output one or more strings separated by commas

2. Print can also output one or more strings, and multiple connectors are used

3. Print_r() can print arrays; objects

bool print_r ( mixed $expression [, bool $return ] )

Parameter Description:

$expression: the variable to be printed. If a variable of type string, integer or float is given, the variable value itself will be printed. If array is given, the keys and elements are displayed in a format. Objects are similar to arrays.
$return: optional. If true, the result will not be output, but will be assigned to a variable. If false, the result will be output directly.

4. Resolution speed echo > Print > print_r();

Recommended Today

[Redis5 source code learning] analysis of the randomkey part of redis command

baiyan Command syntax Command meaning: randomly return a key from the currently selected databaseCommand format: RANDOMKEY Command actual combat:> keys * 1) “kkk” 2) “key1”> randomkey “key1”> randomkey “kkk” Return value: random key; nil if database is empty Source code analysis Main process The processing function corresponding to the keys command is […]