Arquivos
hhvm/hphp/test/quick/SetM.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

32 linhas
375 B
PHP

<?php
$a['a'][][2] = 3;
var_dump($a);
$b = 4;
$b[5] = 6;
var_dump($b);
$c = array(true);
$c[0][1][0][0] = 7;
var_dump($c);
$x = null;
$x[0] = "x";
var_dump($x);
$s = "abc";
$s[-1] = "x";
$s[6] = "gx";
$s[4] = "ex";
var_dump($s);
// Special handling of a few types.
function t($val) {
var_dump($val[] = 1);
}
t("");
t(false);
# t("nonempty"); # Causes fatal.
t(true);