php invoke

Solutions on MaxInterview for php invoke by the best coders in the world

showing results for - "php invoke"
Melina
13 May 2020
1<?php
2class CallableClass
3{
4    public function __invoke($x)
5    {
6        var_dump($x);
7    }
8}
9$obj = new CallableClass;
10$obj(5);
11var_dump(is_callable($obj));
12?>