<?php declare(strict_types=1); class x { function __toString() : string { return "YES"; } } function foo(string $a) {} // piece of syntax of the day (POSOTD) echo $x = new x; print " A $x"; // Fata error: Argument #1 ($a) must be of type string, x given, foo($x); ?>
You have javascript disabled. You will not be able to edit any code.