<?php
class User {}
interface UserGateway {
function find($id): User;
}
class UserGateway_MySql implements UserGateway {
// must return User or subtype of User
function find($id) {
return new User();
}
}
?>
Fatal error: Declaration of UserGateway_MySql::find($id) must be compatible with UserGateway::find($id): User in /in/Wu6Fl on line 11
Process exited with code 255.
Fatal error: Declaration of UserGateway_MySql::find($id) must be compatible with UserGateway::find($id): User in /in/Wu6Fl on line 9
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/Wu6Fl on line 6
Process exited with code 255.