No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / heredoc.php
blob6dcc3e60ae589f2c89f5551f42911f049df6c59c
1 <?hh // partial
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 $a = <<<END
13 This is a heredoc.
14 END;
16 print $a;
18 $interpolation = "an interpolated value";
20 $b = <<< END
21 This is a heredoc with $interpolation.
22 END;
24 $c = <<<END
25 This one has whitespace and a misleading "end".
26 END
27 END;
29 $d = <<<END
30 Words
31 Words
32 Words
33 Words
34 END;
36 class Test {
37 public string $a;
39 public function __construct() {
40 $this->a = 'A';
43 public function __toString(): string {
44 return '<Test>';
48 $test = new Test();
50 print <<<identifier_with_underscores_and_like_50_characters
51 $test = <Test>
52 $test->a = a
53 \x41 = A
55 identifier_with_underscores_and_like_50_characters;