Trong mã sau đây từ http://us2.php.net/manual/en/language.oop5.properties.php biểu tượng < < < có nghĩa là gì?Php <<< có nghĩa là gì?
<?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;
}
?>
Như được đăng, mã này là không chính xác - 'cái EOD; 'dòng không được phép được thụt vào. Lưu ý rằng trang bạn đã liên kết không có phần thụt lề đó. – Amber