- array_map: documentation ( source)
<?php
$mandatoryFields = ['a', 'b', 'c'];
$checkIfMandatoryFieldsAreMissing = function($mandatoryField){
return false;
};
$checkedMandatoryFields = array_map($checkIfMandatoryFieldsAreMissing, $mandatoryFields);