Q. What will be the output?
Code:
declare(strict_types=1);
function add(int $a, int $b) { return $a + $b; }
echo add('5', 5);
β
Correct Answer: (B)
Error
Explanation: Strict types prevent implicit conversion from string to int.