<?php declare(strict_types=1); error_reporting(E_ALL); final class foo { public function __toString(): string { return 'asdas'; } } function bar (string|\Stringable $c) { var_dump((string)$c); } bar(new foo());
You have javascript disabled. You will not be able to edit any code.