3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 class CExplicit
implements Stringish
{
13 public function __toString(): string {
19 public function __toString(): string {
25 public function __toString(): string;
28 function f1(Stringish
$x): string {
29 return __FUNCTION__
.': '.$x;
33 f1("a boring string");
37 $explicit = new CExplicit();
39 $implicit = new CImplicit();
43 function f3(IImplicit
$i): void
{
48 public function __toString(): string {
52 private function foo(): void
{
58 require implements Stringish
;
60 private function foo(): void
{