From ef0601bab5c3f7f57e584594fc34da87cf8cce9c Mon Sep 17 00:00:00 2001 From: Afaq Date: Sun, 25 Aug 2013 11:43:07 -0400 Subject: Updated PHP doc to include print_r() and var_dump() --- php.html.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/php.html.markdown b/php.html.markdown index 083574ee..1a07777a 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -176,6 +176,11 @@ $y = 0; echo $x; // => 2 echo $z; // => 0 +// Dumps type and value of variable to stdout +var_dumb($z); // prints int(3) + +// Prints variable to stdout in human-readable format +print_r($array); // prints: Array ( [0] => One [1] => Two [2] => Three ) /******************************** * Logic -- cgit v1.2.3 From 7af1a853d474fce4feae2429d5e194649fc59105 Mon Sep 17 00:00:00 2001 From: Afaq Date: Sun, 25 Aug 2013 11:49:49 -0400 Subject: Correction to variable output of var_dump() --- php.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php.html.markdown b/php.html.markdown index 1a07777a..1cc6d2c5 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -177,7 +177,7 @@ echo $x; // => 2 echo $z; // => 0 // Dumps type and value of variable to stdout -var_dumb($z); // prints int(3) +var_dumb($z); // prints int(0) // Prints variable to stdout in human-readable format print_r($array); // prints: Array ( [0] => One [1] => Two [2] => Three ) -- cgit v1.2.3