global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / multidef-rec.php
blob753054b0aa2bd773df79ec946d4a2203320555fe
1 <?hh
3 function main() {
4 $count = apc_fetch('rec-test-count');
5 if ($count === false) $count = 0;
6 if ($count >= 2) return;
8 if ($count == 0)
9 require 'record_decl.1.inc';
10 else
11 require 'record_decl.2.inc';
13 if ($count == 0) {
14 $x = Foo['x' => 42];
15 $y = $x['x'];
16 } else {
17 $x = Foo['y' => 'hello'];
18 $y = $x['y'];
20 var_dump($y);
22 $count++;
23 apc_store('rec-test-count', $count);
26 <<__EntryPoint>>
27 function main_multi_record() {
28 main();