TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
436 B
31 lines
436 B
--TEST--
|
|
Heredoc and nowdoc string syntax
|
|
--FILE--
|
|
<?php
|
|
|
|
function main() {
|
|
$name = "World";
|
|
|
|
$heredoc1 = <<<EOT
|
|
Hello, $name!
|
|
This is a heredoc string.
|
|
EOT;
|
|
|
|
$nowdoc1 = <<<'NOW'
|
|
Hello, $name!
|
|
This does NOT interpolate.
|
|
NOW;
|
|
|
|
var_dump($heredoc1);
|
|
var_dump($nowdoc1);
|
|
|
|
echo "done\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(39) "Hello, World!
|
|
This is a heredoc string."
|
|
string(40) "Hello, $name!
|
|
This does NOT interpolate."
|
|
done
|
|
|