Answers for "coercive scalar types"

0

coercive scalar types

function logmsg(string $msg, int $level, float $severity) {
    var_dump($msg);      // string(1) "1"
    var_dump($level);    // int(2)
    var_dump($severity); // float(3)
}
logmsg(1, "2.5 bananas", 3);
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language