Quoted By:
I can't seem to get declare(strict_types=1); working in my PHP code (see pic related).
The file on the left is index.php, everything goes here through the RewriteEngine in Apache. I extract the request data from the URL and pass them to the TaskController (code on the right, loaded by composer automatically).
With strict types enabled, this code should throw a TypeError if $id = null or the type of $id is anything but string. But I can even set it to an int manually in the code before passing, and I don't get a TypeError. It just gets converted as usual
What am I missing here? I'm using PHP 8.2.