- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.26
- Parse error: syntax error, unexpected ';' in /in/PHOW6 on line 18
Process exited with code 255.
<?php
class Token {
protected $name;
protected $closure;
public function __construct($name, \Closure $closure)
{
$this->name = $name;
$this->closure = $closure;
}
public function execute()
{
return call_user_func_array($this->closure, func_get_args());
}
}
$token = new Token('test', function($test) { return "123".$test; };
echo $token->execute();