5 class CExplicit
implements StringishObject
{
6 public function __toString(): string {
12 public function __toString(): string {
18 public function __toString(): string;
21 class CImplicitIntf
implements IImplicit
{
22 public function __toString(): string {
28 public function __toString(): string {
32 private function foo(): string {
33 return (string) $this;
42 require implements StringishObject
;
44 private function foo(): string {
45 return (string) $this;
52 public function __toString(): string {
57 function test(): void
{
58 $cnon = new CNonStringish();
60 $cexp = new CExplicit();
61 $cimp = new CImplicit();
62 $cimpintf = new CImplicitIntf();
63 $cimptuse = new CImplicitTuse();
64 $cimptreq = new CImplicitTreq();