Arquivos
hhvm/hphp/test/slow/ext_array/array_reverse.php
T
Jordan DeLong 9e127b9831 Rewrite TestExtArray in php
Most of this is ported over, except some omissions:
  - array_filter, array_key_exists (suspected we had coverage already;
    one is a bytecode, and one was rewritten in hhas recently)
  - some random cases distinguishing init_null_variant vs. null_variant
2013-06-18 16:23:18 -07:00

20 linhas
350 B
PHP

<?php
function a() {
$input = array("php", 4.0, array("green", "red"));
$result = array_reverse($input);
var_dump($result);
$result_keyed = array_reverse($input, true);
var_dump($result_keyed);
}
function b() {
$input = array("php" => 4.0, 10 => 5.0, "blab" =>"b");
$result = array_reverse($input);
var_dump($result);
}
a();
b();