reverse-print-r
reverse-print-r copied to clipboard
Multiline text causes MalformedPrintROutputException: Could NOT find closing bracket of "Array"
Thanks for creating this library. It helped a lot 🙏🙏
I found one issue when trying to parse an array with multiline text. For example:
<?php
$data = <<<EOL
Array
(
[id] => WH-123
[resource] => Array
(
[id] => 1234
[note_to_payer] => Hi,
this is a multiline text.
)
)
EOL;
$reverser = new ReversePrintR($data);
print_r($reverser->reverse());
This causes:
ReversePrintR\Exception\MalformedPrintROutputException Could NOT find closing bracket of "Array" on line 13.
Thank you, I was able to reproduce the issue. Will try to tackle it ASAP.
I am very sorry that it takes so long to resolve but I need to re-think the way we do reversing to handle such cases.
@simivar no worries. I just wanted to let you know there is a "bug". 😊