dd83c93a8a
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.
25 linhas
455 B
PHP
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";
|