<?php /* declare(strict_types=1); */ $foo = new class { public function __toString () { return "foo"; } }; function bar (string $foo) { var_dump(gettype($foo), $foo); } bar($foo);
You have javascript disabled. You will not be able to edit any code.