summaryrefslogtreecommitdiff
path: root/Zend/tests/bug47516.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug47516.phpt')
-rw-r--r--Zend/tests/bug47516.phpt36
1 files changed, 36 insertions, 0 deletions
diff --git a/Zend/tests/bug47516.phpt b/Zend/tests/bug47516.phpt
new file mode 100644
index 0000000000..66304fe3be
--- /dev/null
+++ b/Zend/tests/bug47516.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote)
+--FILE--
+<?php
+$s='substr';
+
+$htm=<<<DOC
+{$s(<<<'ppp'
+abcdefg
+ppp
+,0,3)}
+DOC;
+
+echo "$htm\n";
+
+$htm=<<<DOC
+{$s(<<<ppp
+abcdefg
+ppp
+,0,3)}
+DOC;
+
+echo "$htm\n";
+
+$htm="{$s(<<<'ppp'
+abcdefg
+ppp
+,0,3)}
+";
+
+echo "$htm\n";
+?>
+--EXPECT---
+abc
+abc
+abc