Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5987310
dump.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
dump.php
View Options
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use
Symfony\Component\VarDumper\Caster\ScalarStub
;
use
Symfony\Component\VarDumper\VarDumper
;
if
(!
function_exists
(
'dump'
))
{
/**
* @author Nicolas Grekas <p@tchwork.com>
* @author Alexandre Daubois <alex.daubois@gmail.com>
*/
function
dump
(
mixed
...
$vars
):
mixed
{
if
(!
$vars
)
{
VarDumper
::
dump
(
new
ScalarStub
(
'🐛'
));
return
null
;
}
if
(
array_key_exists
(
0
,
$vars
)
&&
1
===
count
(
$vars
))
{
VarDumper
::
dump
(
$vars
[
0
]);
$k
=
0
;
}
else
{
foreach
(
$vars
as
$k
=>
$v
)
{
VarDumper
::
dump
(
$v
,
is_int
(
$k
)
?
1
+
$k
:
$k
);
}
}
if
(
1
<
count
(
$vars
))
{
return
$vars
;
}
return
$vars
[
$k
];
}
}
if
(!
function_exists
(
'dd'
))
{
function
dd
(
mixed
...
$vars
):
never
{
if
(!
\in_array
(
\PHP_SAPI
,
[
'cli'
,
'phpdbg'
,
'embed'
],
true
)
&&
!
headers_sent
())
{
header
(
'HTTP/1.1 500 Internal Server Error'
);
}
if
(!
$vars
)
{
VarDumper
::
dump
(
new
ScalarStub
(
'🐛'
));
exit
(
1
);
}
if
(
array_key_exists
(
0
,
$vars
)
&&
1
===
count
(
$vars
))
{
VarDumper
::
dump
(
$vars
[
0
]);
}
else
{
foreach
(
$vars
as
$k
=>
$v
)
{
VarDumper
::
dump
(
$v
,
is_int
(
$k
)
?
1
+
$k
:
$k
);
}
}
exit
(
1
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 4, 00:24 (2 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
77/50/e7a08975c45539a6ac4e9173fc39
Default Alt Text
dump.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment