PHP 8.5.0 RC 1 available for testing

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

Anonymous
16 years ago
If you want to check whether you're dealing with a closure specifically and not a string or array callback you can do this:

<?php
$isAClosure
= is_callable($thing) && is_object($thing);
?>

<< Back to user notes page

To Top