Arquivos
hhvm/hphp/test/slow/array/promote_string2.php
T
mwilliams a61c47e801 Fix refCounts for SetM on strings
When we throw an InvalidSetMException, we need to incRef the value we
throw.
2013-07-06 11:12:23 -07:00

18 linhas
230 B
PHP

<?php
class X {
function __destruct() { var_dump(__METHOD__); }
function __toString() { return __METHOD__; }
}
function test($a) {
var_dump($a[-1] = new X);
var_dump($a);
}
test("");
echo "1\n";
test("x");
echo "2\n";