Updating submodules
[hiphop-php.git] / hphp / test / slow / def-sink-bug.php
blob71f16ea60e36ae994c15a7c556e838f5c2a0e5c1
1 <?hh
3 <<__NEVER_INLINE>>
4 function foo($v) {
5 $c = count($v);
6 $v[] = __hhvm_intrinsics\launder_value(4);
7 if ($c != 1) {
8 var_dump('$c', $c);
12 <<__EntryPoint>>
13 function main() {
14 // Bias the profile towards COWing the array
15 for ($i = 0; $i < 30; $i++) {
16 $s_vec = vec[3];
17 foo($s_vec);
20 // Actual test.
21 $vec = vec[rand(1,2)]; // Non static vec.
22 foo($vec);
24 echo "Done!";