Do you remember that previously when you would use a boolean as an array, php would send a notice, but with php8 that notice is a warning now?
$obj = false;
var_dump($obj); /* false */
var_dump($obj[1]); /* null (and warning now) */
Is there a way to create an object/class that has that same behaviour? In other words, can you create a class that when assigned directly to a variable behaves as one data type but that class can also be consumed as an array and return a different value/data-type?