Last updated: Mon, Apr 17, 2023 7:40 am
Return to Knowledgebase
# | Parameter | Data Type | Required | Description |
---|---|---|---|---|
1 | $var | Yes | The variable to be dumped. | |
2 | $adminOnly = false | bool | No | A boolean flag indicating whether the dump should only be displayed for users with admin privileges. Default is false. |
3 | $localhostOnly = false | bool | No | A boolean flag indicating whether the dump should only be displayed if the code is running on localhost. Default is false. |
Data Type | Description of Returned Data |
---|---|
nothing |
// Dump the contents of a variable
$myVar = [1, 2, 3];
dump($myVar);
// Only display the dump for admin users
dump($myVar, true);
// Only display the dump if running on localhost
dump($myVar, false, true);
// Only display the dump for admin users running on localhost
dump($myVar, true, true);