<?php
var_export([
// string, then times
'0:1' => str_repeat(0, 1), // '0'
'1:0' => str_repeat(1, 0), // ''
'0:0' => str_repeat(0, 0), // ''
'1:1' => str_repeat(1, 1), // '1'
]);
echo "\n---\n";
$params = [
['one' => 0, 'two' => 1, 'three' => 0, 'four' => 1], // strings
['three' => 0, 'one' => 1, 'four' => 1, 'two' => 0], // times
'str_repeat'
];
var_export([
'udiff' => array_udiff_assoc(...$params),
'uintersect' => array_uintersect_assoc(...$params),
]);
preferences:
24.15 ms | 407 KiB | 5 Q