<?php
// declare(strict_types=1); # Rimuovi il commento per vedere cosa accade dichiarando i tipi come strict
function printIntValue(int $value)
{
var_dump($value);
}
printIntValue(5.9);
Catchable fatal error: Argument 1 passed to printIntValue() must be an instance of int, double given, called in /in/bp1Xt on line 10 and defined in /in/bp1Xt on line 5
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Fatal error: Argument 1 passed to printIntValue() must be an object of class int, called in /in/bp1Xt on line 10 and defined in /in/bp1Xt on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Argument 1 must be an object of class int in /in/bp1Xt on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/bp1Xt on line 5
Process exited with code 255.