Arquivos
hhvm/hphp/test/slow/ext_array/array_intersect_key.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

7 linhas
251 B
PHP

<?php
$array1 = array("blue" => 1, "red" => 2, "green" => 3, "purple" => 4);
$array2 = array("green" => 5, "blue" => 6, "yellow" => 7, "cyan" => 8);
var_dump(array_intersect_key($array1, $array2));
var_dump(array_intersect_key(null, array(1 => 1)));