Php what does <<< mean ?
Posted
by Doodle
on Stack Overflow
See other posts from Stack Overflow
or by Doodle
Published on 2010-05-06T10:00:26Z
Indexed on
2010/05/06
10:08 UTC
Read the original article
Hit count: 322
In the following code from http://us2.php.net/manual/en/language.oop5.properties.php what does the <<< symbol mean?
<?php
class SimpleClass
{
// invalid property declarations:
public $var1 = 'hello ' . 'world';
public $var2 = <<<EOD
hello world
EOD;
public $var3 = 1+2;
public $var4 = self::myStaticMethod();
public $var5 = $myVar;
// valid property declarations:
public $var6 = myConstant;
public $var7 = array(true, false);
// This is allowed only in PHP 5.3.0 and later.
public $var8 = <<<'EOD'
hello world
EOD;
}
?>
© Stack Overflow or respective owner