MySQL Forums
Forum List  »  PHP

Migrating from PHP 5.6.x to PHP 7.0.x
Posted by: dipto binotr
Date: September 11, 2018 01:21PM

<?php
// Coercive mode
function sumOfInts(int ...$ints)
{
return array_sum($ints);
}

var_dump(sumOfInts(2, '3', 4.1));

Options: ReplyQuote


Subject
Written By
Posted
Migrating from PHP 5.6.x to PHP 7.0.x
September 11, 2018 01:21PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.