Voting

: max(three, zero)?
(Example: nine)

The Note You're Voting On

Glen
18 years ago
Like previously reported, i find var_export() frustrating when dealing with recursive structures. Doing a :

<?php
var_export
($GLOBALS);
?>

fails. Interestingly, var_dump() has some logic to avoid recursive references. So :

<?php
var_dump
($GLOBALS);
?>

works (while being more ugly). Unlike var_export(), var_dump() has no option to return the string, so output buffering logic is required if you want to direct the output.

<< Back to user notes page

To Top