363d1bb20f
This change is mostly for FB internal organizational reasons. Building is not effected beyond the fact that the target now lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
29 linhas
492 B
PHP
29 linhas
492 B
PHP
<?php
|
|
|
|
function f() { return array(); }
|
|
|
|
function populateArray($max) {
|
|
$a = f();
|
|
for ($i = 0; $i < $max; ++$i) {
|
|
$a[$i] = $i * 9;
|
|
}
|
|
|
|
for ($i = 0; $i < $max; ++$i) {
|
|
if ($a[$i] != $i * 9) {
|
|
echo "mismatch: "; echo $i; echo ": ";
|
|
echo $a[$i]; echo "; should be "; echo $i * 9;
|
|
echo "\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
$a = f();
|
|
echo "writing: "; echo ($a[1] = 66); echo "\n";
|
|
echo "reading: "; echo $a[1]; echo "\n";
|
|
|
|
populateArray(1000);
|
|
}
|
|
|
|
main();
|