Arquivos
hhvm/hphp/test/vm/boxed_static_string.php
T
jdelong c5db7e39ab Fix a bug with boxed static/counted types
When we box things, we need to forget whether we knew it was
static or not because we don't track when that might change.
2013-04-02 15:01:37 -07:00

18 linhas
245 B
PHP

<?php
function breaker(&$x) {
$x = (string)mt_rand();
}
function foo() {
$x = "";
breaker($x);
// Bug #2240782: HHIR needs to think of $x as a BoxedStr, not a
// BoxedStaticStr here.
echo "Num: ";
echo $x;
echo "\n";
}
foo();