- array_intersect: documentation ( source)
- var_export: documentation ( source)
- array_fill_keys: documentation ( source)
<?php
$all = ['a', 'b', 'c'];
$defaults = array_fill_keys($all, 0);
$new = ['b', 'c'];
var_export(
array_fill_keys(array_intersect($all, $new), 1)
+ $defaults
+ ['directCallId' => '654']
);