is_callable
symfony/var-dumper
Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Verify that a value can be called as a function from the current scope.
is_callable
(
mixed $value
,
bool $syntax_only
=
false
,
string
&
$callable_name
=
null
):
bool
public static function
wrapCallable
(
$callable
)
{
if (
\is_object
(
$callable
) || !
\is_callable
(
$callable
)) {
return
$callable
;
}
Caster/ClassStub.php
{
$prev
=
$this
->
outputStream
??
$this
->
lineDumper
;
if (
\is_callable
(
$output
)) {
$this
->
outputStream
=
null
;
$this
->
lineDumper
=
$output
;
} else {
Dumper/AbstractDumper.php