Fix memoization of functions called with keyset arguments
[hiphop-php.git] / hphp / test / quick / xhp_attribute_type_mixed.php
blob64142199a9ad610cd69ea7de6c1ff5477ddec750
1 <?php
3 abstract class :base {
4 // This is necessary because the generated __xhpAttributeDeclaration() has a
5 // call to parent::__xhpAttributeDeclaration().
6 protected static function __xhpAttributeDeclaration() {
7 return array();
10 public static function xhpAttributeDeclaration() {
11 return static::__xhpAttributeDeclaration();
15 class :node1 extends :base {
16 attribute
17 mixed checkme;
20 class :node2 extends :base {
21 attribute
22 Exception e,
23 mixed checkme;
26 class :node3 extends :base {
27 attribute
28 int num,
29 mixed checkme,
30 var beans,
31 string cheese;
34 class :node4 extends :base {
35 attribute
36 int num = 2,
37 mixed checkme,
38 var beans,
39 string cheese = "hi";
42 function mixedFn1(mixed $test) { return 'fn'; }
43 function mixedFn2(string $a1, mixed $v2) { return 'fn'; }
45 echo
46 :node1::xhpAttributeDeclaration()['checkme'][0].
47 :node2::xhpAttributeDeclaration()['checkme'][0].
48 :node3::xhpAttributeDeclaration()['checkme'][0].
49 :node4::xhpAttributeDeclaration()['checkme'][0].
50 mixedFn1(1).
51 mixedFn2('a1', 'hi')."\n";