Created
May 7, 2015 02:37
-
-
Save slav123/8474018450c638ca76b7 to your computer and use it in GitHub Desktop.
long code in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$var = "some text"; | |
$text = <<<EOT | |
Place your text between the EOT. It's | |
the delimiter that ends the text | |
of your multiline string. | |
$var | |
EOT; | |
// The difference between Heredoc and Nowdoc is, that php code embedded in an heredoc gets executed, while php code in Nowdoc will be printed out as is. | |
$var = "foo"; | |
$text = <<<'EOT' | |
My $var | |
EOT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment