79415767

Date: 2025-02-05 18:16:56
Score: 0.5
Natty:
Report link

Another solution using array_unique, to check if first array is onto another one.

$arr1 = [1,2,3];
$arr2 = [1,2,3,4,5,6,7];
$arrayContains = count(array_unique([...$arr1, ...$arr2])) === count($arr2);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nicolas Bonnici