Question from the PHP7 test

Archived

What will this code display?

<?php
declare(strict_types= 1);

function sumOfInts(int... $ints)
{
    return array_sum($ints);
}

var_dump(sumOfInts(2, '3', 4.1));
Author: Julien BreuxStatus: Archived(New question!)Question passed 698 times
-1
Community Evaluations
developer avatar
Umar
24/07/2022
I ran this code and got a fatal error which is my answer, but it's marked as wrong here? https://www.tehplayground.com/pqWeNrhcVNMeI9iY
developer avatar
Auteur anonyme
05/09/2022
Thank you Umar, fixed it !