Passing an incompatible parameter type to a strictly typed PHP function.
PHP 7/8 throws `TypeError` when a function parameter declared with type hint `Y` receives a value of incompatible type `X`.
Passing null or string values to function parameters expecting non-null integers or objects, especially with `declare(strict_types=1);`.
1<?php2declare(strict_types=1);3 4function calculateTax(int $amount): float {5 return $amount * 0.15;6}7 8calculateTax("100"); // TypeError: Argument #1 ($amount) must be of type int, string given1<?php2declare(strict_types=1);3 4function calculateTax(int $amount): float {5 return $amount * 0.15;6}7 8// Convert string to int explicitly before calling9calculateTax((int)"100");Simulate standard system builds to trigger compiler trace records and track memory crashes locally.
In strict types mode, passing string `"100"` into `int $amount` parameter throws a `TypeError`.