Last active
December 18, 2015 22:09
-
-
Save HugoPresents/5852240 to your computer and use it in GitHub Desktop.
PHP print vars with <pre>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function print_vars() { | |
$vars = func_get_args(); | |
echo '<pre>'; | |
foreach ($vars as $var) { | |
ob_start(); | |
var_dump($var); | |
echo htmlspecialchars(ob_get_clean()); | |
} | |
echo '</pre>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment