Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php invoke

<?php
class CallableClass
{
    public function __invoke($x)
    {
        var_dump($x);
    }
}
$obj = new CallableClass;
$obj(5);
var_dump(is_callable($obj));
?>
 
PREVIOUS NEXT
Tagged: #php #invoke
ADD COMMENT
Topic
Name
1+5 =