Arquivos
hhvm/hphp/test/quick/array-ref.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

23 linhas
324 B
PHP

<?php
function yes() { return true; }
function main() {
$a = array();
$a['wat'] =& $a;
$b = $a; // Make sure the next line triggers COW
if (yes()) {
// Force a new tracelet
$a['wat'] = 5;
}
var_dump($a);
}
main();
function main2(&$a) {
$a = array();
$a['foo'] = 'flee';
}
main2($z);
var_dump($z);