1--TEST--
2__toString() from trait with invalid return type
3--FILE--
4<?php
5
6trait T {
7    public function __toString(): int {
8        return "ok";
9    }
10}
11
12?>
13--EXPECTF--
14Fatal error: T::__toString(): Return type must be string when declared in %s on line %d
15