- var_dump: documentation ( source)
<?php
function section(string $section): bool {
if (empty($section) || !in_array($section, ['news', 'viewpoint'])) {
return false;
}
return true;
}
var_dump(section('newsvvhfgjh'));