I really love var_export()
. If you like copy/paste-able code, try:
echo '<pre>' . var_export($data, true) . '</pre>';
Or even something like this for color syntax highlighting:
highlight_string("<?php
$data =
" . var_export($data, true) . ";
?>");
You can do the same with print_r()
. For var_dump()
you would just need to add the <pre>
tags:
echo '<pre>';
var_dump($data);
echo '</pre>';
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…