- explode: documentation ( source)
<?php
$fileContent = <<<'PHP'
input
-----
expected output
PHP;
echo $fileContent;
echo PHP_EOL . PHP_EOL . PHP_EOL . PHP_EOL;
[$input, $expectedOutput] = explode("\n-----\n", $fileContent);
echo $input;
echo PHP_EOL . PHP_EOL;
echo $expectedOutput;
echo PHP_EOL . PHP_EOL;