php之强制回调类型callable

<?php

function demo(callable $fn)
{
    $fn();
}
function callback()
{
    echo __FUNCTION__,'<br/>';
}
demo('callback');