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

17 linhas
348 B
PHP

<?php
// test manually created array
function main() {
$x = null;
$a = array();
$a[0] = 'zero';
$a[1] = 'one';
var_dump(current($a)); // should print 'zero'
// test static array
$a = array('zero', 'one');
var_dump(current($a));
// test NewTuple array
$a = array('zero', ($x ? 'one' : 'one'));
var_dump(current($a));
}
main();