Note that -- as mentioned in the migration guide-- starting from PHP 8.0, is_callable() will not work with non-static methods if you use a class name, instead an object of the class should be provided:
<?php
class Test
{
public function method1() { }
public static function method2() { }
}
var_dump(is_callable(array('Test', 'method1'))); var_dump(is_callable(array('Test', 'method2'))); var_dump(is_callable(array('Test', 'method1'))); var_dump(is_callable(array('Test', 'method2'))); var_dump(is_callable(array(new Test, 'method1'))); ?>