function show_var( $var) {if (is_scalar($var)) {echo $var;} else {var_dump($var);}} $pi = 3.1416; $proteins = array("hemoglobin", "cytochrome c oxidase", "ferredoxin"); show_var($pi); / / prints:
?php function show_var( $var) {if (is_scalar($var)) echo $var; else var_dump($var);} $pi = 3.1416; $proteines = array("hemoglobine", "cytochrome c oxidase", "ferredoxine"); show_var($pi); / / affiche: