Voting

: min(one, five)?
(Example: nine)

The Note You're Voting On

Taufik Nurrohman
2 years ago
You know that anonymous function is just an instance of class `Closure` so this would be equivalent to check whether a variable is an anonymous function or not:

<?php

$test
= function () {};

if (
is_callable($test) && is_object($test) && $test instanceof Closure) { /* ... */ }

?>

<< Back to user notes page

To Top