<?php
class integer {
private $value;
public function __construct(int $value)
{
$this->value = $value;
}
public function __invoke(...$value)
{
var_dump($value);
}
}
$testi = new integer(1);
$testi();
Catchable fatal error: Argument 1 passed to integer::__construct() must be an instance of int, integer given, called in /in/a6CL7 on line 17 and defined in /in/a6CL7 on line 6
Process exited with code 255.
Output for 5.5.0 - 5.5.38
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/a6CL7 on line 11
Process exited with code 255.