summaryrefslogtreecommitdiff
path: root/Zend/tests/heredoc_010.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-02-12 09:28:30 +0000
committerDmitry Stogov <dmitry@php.net>2008-02-12 09:28:30 +0000
commit87a8f72f49b203e972e2bc9db6c74b8d602a1379 (patch)
treeabd1982e7c6a491b21af0e328c766d599e2f0bd6 /Zend/tests/heredoc_010.phpt
parent70252556cc7376ba5547f2f9e16c274fa5fb92a7 (diff)
downloadphp-git-87a8f72f49b203e972e2bc9db6c74b8d602a1379.tar.gz
Added NOWDOC
Diffstat (limited to 'Zend/tests/heredoc_010.phpt')
-rw-r--r--Zend/tests/heredoc_010.phpt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/tests/heredoc_010.phpt b/Zend/tests/heredoc_010.phpt
new file mode 100644
index 0000000000..5aa0433bcf
--- /dev/null
+++ b/Zend/tests/heredoc_010.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Torture the T_END_HEREDOC rules with variable expansions (heredoc)
+--FILE--
+<?php
+
+require_once 'nowdoc.inc';
+$fooledYou = '';
+
+print <<<ENDOFHEREDOC
+{$fooledYou}ENDOFHEREDOC{$fooledYou}
+ENDOFHEREDOC{$fooledYou}
+{$fooledYou}ENDOFHEREDOC
+
+ENDOFHEREDOC;
+
+$x = <<<ENDOFHEREDOC
+{$fooledYou}ENDOFHEREDOC{$fooledYou}
+ENDOFHEREDOC{$fooledYou}
+{$fooledYou}ENDOFHEREDOC
+
+ENDOFHEREDOC;
+
+print "{$x}";
+
+?>
+--EXPECT--
+ENDOFHEREDOC
+ENDOFHEREDOC
+ENDOFHEREDOC
+ENDOFHEREDOC
+ENDOFHEREDOC
+ENDOFHEREDOC