Symfony\Component\Yaml\Inline::dump
Dumps a given PHP variable to a YAML string.
Signature
public function dump(mixed
$value,
[Boolean
$exceptionOnInvalidType = false,
[Boolean
$objectSupport = false]] )
Parameters
$value
—
mixed
- The PHP variable to convert
$exceptionOnInvalidType
—
object
- true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
$objectSupport
—
object
- true if object support is enabled, false otherwise
Returns
- string
- The YAML string representing the PHP array
Errors/Exceptions
-
DumpException
- When trying to dump PHP resource