Difference between revisions of "Php"
From ThorstensHome
(→magic words) |
(→variables' content) |
||
Line 14: | Line 14: | ||
== variables' content == | == variables' content == | ||
[http://de3.php.net/manual/en/function.var-dump.php var_dump] | [http://de3.php.net/manual/en/function.var-dump.php var_dump] | ||
+ | |||
+ | To output an array use | ||
+ | echo serialize($array) | ||
== magic words == | == magic words == |
Revision as of 14:50, 10 January 2015
Contents |
Debugging
output
Here is a php trick that outputs debugging output when you want.
$handler=fopen("/tmp/debug","a"); fwrite ($handler, "hello world"); fclose ($handler);
example for variables:
$handler=fopen("/tmp/debug","a"); fwrite ($handler, var_export($variable,true)); fclose ($handler);
variables' content
To output an array use
echo serialize($array)
magic words
Parameters
$argv[1]