3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function array_diff_b($array1, $array2) { $diff = array_diff($array1, $array2); return (empty($diff)) ? TRUE : FALSE; } $a = array ('v1', 'v3', 'v4'); $b = array ('v1', 'v2', 'v3', 'v4', 'v5'); $result = array_diff_b($a, $b); var_dump($result);
Output for 4.3.0 - 7.1.10
bool(true)