Basic flow analysis on if statements
[hiphop-php.git] / hphp / test / slow / inout / closure.php
blobaad68478e414bbbd5148250bb80758b3fe52ba84
1 <?hh
3 function main($cl1) {
4 $cl2 = (inout $x) ==> {
5 $x = 5;
6 return 6;
7 };
8 $cl3 = function (inout $x) {
9 $x = 6;
10 return 7;
13 $x = null;
14 var_dump($cl1(inout $x), $x, $cl2(inout $x), $x, $cl3(inout $x), $x);
18 <<__EntryPoint>>
19 function main_closure() {
20 main((inout $x) ==> {
21 $x = 4;
22 return 5;
23 });