My understanding of array_diff()
, is that the following code must return array($a[1])
.
This is not the behavior. Instead, an array()
returned.
What I understand wrong?
<?php
$a = array(
array('contract' => '5/1-4-2019'),
array('contract' => '1/1-4-2019'));
$b = array($a[0]);
var_dump(array_diff($a, $b));
?>