Arquivos
hhvm/hphp/test/vm/setop-incdec-refs.php
T
bsimmers 7219dec255 Implement more final operations in VectorTranslator
Most of this is pretty boring and mechanical. I added
VectorProp and VectorElem flags to help deal with the increasing
number of vector-related opcodes.
2013-03-22 11:48:50 -07:00

34 linhas
495 B
PHP

<?php
// Copyright 2004-present Facebook. All Rights Reserved.
function properties() {
$c = new stdclass;
$a = 5;
$c->foo =& $a;
var_dump($c);
$x = $c->foo += 10;
var_dump($c);
var_dump($a);
$x = --$c->foo;
var_dump($c);
var_dump($a);
}
function elements() {
$a = array();
$v = 'a string';
$a['ref'] =& $v;
var_dump($a);
$x = $a['ref'] .= ' tail';
var_dump($a);
var_dump($v);
$x = $a['ref']++;
var_dump($a);
var_dump($v);
}
properties();
elements();