-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_VarExport.php
More file actions
36 lines (28 loc) · 1014 Bytes
/
debug_VarExport.php
File metadata and controls
36 lines (28 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
define('DEBUG_EXPORT_PATH', sys_get_temp_dir());
// In this example, the vendor folder is located in "example/"
require_once __DIR__.'/vendor/autoload.php';
$varText = 'lorem ipsu';
$varTrue = true;
$varFalse = false;
// Export Data with <pre></pre> and formatted value
// like "# null #" for null, "# true #" for true, etc
VarExport(
$varText,
$varTrue,
$varFalse,
time(),
file_get_contents(__DIR__.'/../readme.md')
);
// Return values
$valuesExported = varExportData($varText, $varTrue);
// Hide exported Data on HTML comment
varComment($varFalse, $valuesExported);
// Export values on DEBUG_EXPORT_PATH/$debugFIle
// Usefull for debug Ajax request / Api or any request without printed stream
VarExportFile($varText, $varTrue, null);
// Export php error on debug file (use VarExportFile)
varExportError();
echo $varDontExist;
// Debug and export function, display method information (arguments, return value, etc)
varExportFunc('htmlentities', [$varText, ENT_QUOTES, 'UTF-8']);