3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Get the values "a", "b" from $arr = array('a' => 'foo', 'b' => 'bar', 'c' => 'car'); var_dump(array_intersect_key($arr, array_flip(array('a', 'b')))); // returns array('array('a' => 'foo', 'b' => 'bar')