3v4l.org

run code in 300+ PHP versions simultaneously
<?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); ?>
Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
YES A YES

preferences:
69.43 ms | 406 KiB | 5 Q