heredoc_006.phpt 408 B

1234567891011121314151617181920212223
  1. --TEST--
  2. braced complex variable replacement test (heredoc)
  3. --FILE--
  4. <?php
  5. require_once 'nowdoc.inc';
  6. print <<<ENDOFHEREDOC
  7. This is heredoc test #s {$a}, {$b}, {$c['c']}, and {$d->d}.
  8. ENDOFHEREDOC;
  9. $x = <<<ENDOFHEREDOC
  10. This is heredoc test #s {$a}, {$b}, {$c['c']}, and {$d->d}.
  11. ENDOFHEREDOC;
  12. print "{$x}";
  13. ?>
  14. --EXPECT--
  15. This is heredoc test #s 1, 2, 3, and 4.
  16. This is heredoc test #s 1, 2, 3, and 4.