<?php
function array_all($array, $callback) {
foreach($array as $item) {
if (!$callback($item)) {
return false;
}
}
return true;
}
$title = 0;
$squad = 0;
$level = 0;
$resultado = array_all([$title, $squad, $level], function ($item) {
return $item == 0;
});
PD9waHAKCmZ1bmN0aW9uIGFycmF5X2FsbCgkYXJyYXksICRjYWxsYmFjaykgewogICAgZm9yZWFjaCgkYXJyYXkgYXMgJGl0ZW0pIHsKICAgICAgICBpZiAoISRjYWxsYmFjaygkaXRlbSkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgIH0KICAgIAogICAgcmV0dXJuIHRydWU7Cn0KCiR0aXRsZSA9IDA7CiRzcXVhZCA9IDA7CiRsZXZlbCA9IDA7CgokcmVzdWx0YWRvID0gYXJyYXlfYWxsKFskdGl0bGUsICRzcXVhZCwgJGxldmVsXSwgZnVuY3Rpb24gKCRpdGVtKSB7CiAgICByZXR1cm4gJGl0ZW0gPT0gMDsKfSk7Cgp2YXJfZHVtcCgkcmVzdWx0YWRvKTs=