src/Phn/Compilation/Compiler.php
public function string($string, $singleLine = false)
    {
        $string = sprintf('"%s"', addcslashes($string, "\0\t\"\$\\"));

        if ($singleLine === true) {
            $string = preg_replace('/\n/', '\n', $string);
        }

        $this->source .= $string;

        return $this;
    }
public function string($string, $singleLine = false)
    {
        $string = sprintf('"%s"', addcslashes($string, "\0\t\"\$\\"));

        if ($singleLine === true) {
            $string = preg_replace('/\n/', '\n', $string);
        }

        $this->source .= $string;

        return $this;
    }
public function string ( $ string , $ singleLine = false ) { $ string = sprintf ( '"%s"' , addcslashes ( $ string , "\0\t\"\$\\" ) ) ; if ( $ singleLine === true ) { $ string = preg_replace ( '/\n/' , '\n' , $ string ) ; } $ this -> source .= $ string ; return $ this ; }
Adds a string to the source code.

The following code:

$compiler
->nl()->string('Hello world')->raw(';')
;

Compiles into:

<?php

"Hello World";

@param string $string     The string to add.
@param bool   $singleLine Specifies if the given string should be represented inline or not. false per default.

@return $this The current compiler.
Adds a string to the source code .