Arquivos
hhvm/hphp/test/vm/string-cse.php
T
bsimmers dd83c93a8a Remove DecRef's source from the cse table
DecRef needs to be the last use of its source, since it might
destruct it. In the new test case, the second cast expression was
reusing the result of the first (through CSE) after it had been
DecReffed and destroyed.
2013-03-09 15:07:50 -08:00

25 linhas
455 B
PHP

<?php
// Copyright 2004-present Facebook. All Rights Reserved.
class c {
private static $thing;
private static $otherthing;
public static function doit($id, $value) {
self::$thing[(string)$id] = $value;
self::$otherthing[(string)$id] = $value;
}
public static function dump() {
var_dump(self::$thing, self::$otherthing);
}
}
function main() {
c::doit(0, 'hello');
c::dump();
}
echo "Calling main\n";
main();
echo "Done\n";