<?php
$str = <<<EOD
$str = <<<EOD
this is some something will to be prite;
EOD; // 不能有空格,不然会报错
class foo{
var $foo;
var $bar ;
function fun(){
$this->foo = 'foo';
$this->bar = Array('bar1','bar2','bar3');
}
}
$foo = new foo();
$name = 'zjl';
echo <<<EOT
My name is "$name"; I like $foo->foo;
now i am priting something {$foo-> bar[2]};
this should captal a 'A': \x41'
var $foo;
var $bar ;
function fun(){
$this->foo = 'foo';
$this->bar = Array('bar1','bar2','bar3');
}
}
$foo = new foo();
$name = 'zjl';
echo <<<EOT
My name is "$name"; I like $foo->foo;
now i am priting something {$foo-> bar[2]};
this should captal a 'A': \x41'
EOT;
// 不能有空格,不然会报错
?>
有空格-报错:
Parse error
: syntax error, unexpected end of file in
C:\xampp\htdocs\php\2tyle\str_eot.php
on line
24