Export variables to a readable format

Code
<?php

use SebastianBergmann\Exporter\Exporter;

$exporter = new Exporter();

// a print_r like output
echo $exporter->export("string\nnewline") . PHP_EOL;
echo 
$exporter->export(1) . PHP_EOL;
echo 
$exporter->export(null) . PHP_EOL;
echo 
$exporter->export(true) . PHP_EOL;
echo 
$exporter->export(
    [
'key' => 'value'42=> null]
);
Result
'string\n
newline'
1
null
true
Array &0 (
'key' => 'value'
0 => 42
7 => null
)
Used Versions
PHP 7.3, Zend 3.0, Symfony 4.3, Laravel 5.8, PHPUnit 8.0, Doctrine 2.10