Arquivos
hhvm/hphp/test/vm/incdec-1.php
T
ottoni 334a83f7b6 Expand IncDecL support, use inc/dec x86 instructions, avoid useless moves
Add support for boxed ints, and boxed/unboxed doubles, and bools.

Emit inc/dec x86 instructions in some cases.

Got rid of some "mov rX, rX" found along the way.
2013-03-05 22:07:58 -08:00

13 linhas
125 B
PHP

<?php
function dec($x) {
return $x + -1;
}
function inc($x) {
return $x - (-1);
}
var_dump(dec(5));
var_dump(inc(5));