3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo '<pre>'; $puas['puas']= array(0,40,65); $biasa['puas']= array(40,65,80); $istimewa['istimewa']= array(65,80,100); echo '<hr>'; function multidimensional_array_diff($a1,$a2) { $r = array(); foreach ($a2 as $key => $second) { foreach ($a1 as $key => $first) { if (isset($a2[$key])) { foreach ($first as $first_value) { foreach ($second as $second_value) { if ($first_value == $second_value) { $true = true; break; } } if (!isset($true)) { $r[$key][] = $first_value; } unset($true); } } else { $r[$key] = $first; } } } return $r; } print_r(multidimensional_array_diff($puas, $biasa));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<pre><hr>Array ( [puas] => Array ( [0] => 0 ) )