fopen
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Opens file or URL
fopen
(
string $filename
,
string $mode
,
bool $use_include_path
=
false
,
?
resource $context
=
null
):
resource
|
false
$this
->
lineDumper
=
$output
;
} else {
if (
\is_string
(
$output
)) {
$output
=
fopen
(
$output
,
'w'
);
}
$this
->
outputStream
=
$output
;
$this
->
lineDumper
= [
$this
,
'echoLine'
];
Dumper/AbstractDumper.php
}
if (
$returnDump
=
true
===
$output
) {
$output
=
fopen
(
'php://memory'
,
'r+'
);
}
if (
$output
) {
$prevOutput
=
$this
->
setOutput
(
$output
);
Dumper/AbstractDumper.php
}
$h
=
stream_get_meta_data
(
$this
->
outputStream
) + [
'wrapper_type'
=>
null
];
$h
=
'Output'
===
$h
[
'stream_type'
] &&
'PHP'
===
$h
[
'wrapper_type'
] ?
fopen
(
'php://stdout'
,
'w'
) :
$this
->
outputStream
;
return static::
$defaultColors
=
$this
->
hasColorSupport
(
$h
);
}
Dumper/CliDumper.php
public function
testClosedResource
()
{
$var
=
fopen
(
__FILE__
,
'r'
);
fclose
(
$var
);
$dumper
= new
CliDumper
(
'php://output'
);
Tests/Dumper/CliDumperTest.php
public function
testThrowingCaster
()
{
$out
=
fopen
(
'php://memory'
,
'r+'
);
require_once
__DIR__
.
'/../Fixtures/Twig.php'
;
$twig
= new
\__TwigTemplate_VarDumperFixture_u75a09
(new
Environment
(new
FilesystemLoader
()));
Tests/Dumper/CliDumperTest.php
public function
testAppend
()
{
$out
=
fopen
(
'php://memory'
,
'r+'
);
$dumper
= new
HtmlDumper
();
$dumper
->
setDumpHeader
(
'<foo></foo>'
);
Tests/Dumper/HtmlDumperTest.php
$foo
= new
DumbFoo
();
$foo
->
bar
=
'bar'
;
$g
=
fopen
(
__FILE__
,
'r'
);
$var
= [
'number'
=>
1
,
null
,
Tests/Fixtures/dumb-var.php