<?php function add() { $total = 0; foreach (func_get_args() as $number) { if (!is_numeric($number)) { continue; } $total += $number; } return $total; } echo add(1,2,'a');
To embed this project on your website, copy the following code and paste it into your website's HTML: