Arquivos
hhvm/hphp/test/vm/SetM.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08: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);