Var dump(): Difference between revisions
No edit summary |
No edit summary |
||
| Line 20: | Line 20: | ||
===Example=== | ===Example=== | ||
<code>$colors = ['red', 'green', 'blue'];</code><br> | |||
<code>var_dump($ | <code>var_dump($colors);</code> | ||
Outputs: | |||
<pre> | |||
array(3) { | |||
[0]=> string(3) "red" | |||
[1]=> string(5) "green" | |||
[2]=> string(4) "blue" | |||
} | |||
</pre> | |||
Three items in the array. Each one identified by its position, its type, its length, and its value. | |||
Nothing assumed. Nothing hidden. | |||
===See also=== | ===See also=== | ||