src/Phn/Compilation/Compiler.php
public function write($content = '')
    {
        $content = preg_split('/\R/', $content);

        foreach ($content as $line) {
            $this->source .= PHP_EOL.str_repeat('    ', $this->depth).$line;
        }

        return $this;
    }
public function write($content = '')
    {
        $content = preg_split('/\R/', $content);

        foreach ($content as $line) {
            $this->source .= PHP_EOL.str_repeat('    ', $this->depth).$line;
        }

        return $this;
    }
public function write ( $ content = '' ) { $ content = preg_split ( '/\R/' , $ content ) ; foreach ( $ content as $ line ) { $ this -> source .= PHP_EOL . str_repeat ( '    ' , $ this -> depth ) . $ line ; } return $ this ; }
Write a new line of code. The new line is added before the content. A block of code can also be wrote in one
shot.

The following code:

$block = <<<PHP
echo " ";
echo "World";
PHP;

$compiler
->write('echo "Hello";')
->write($block)
;

Compiles into:

<?php

echo "Hello";
echo " ";
echo "World";

@param string $content The code to write.

@return $this The current compiler.
Write a new line of code . The new line is added before the content . A block of code can also be wrote in one shot .