My validate function looks like that
function validate($data, $data2 = 0, $type)
{
...
Function call example
if ($result =
Notice that starting with PHP 7.1 this will throw a PHP Fatal error, not just a warning:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function validate(), 2 passed in /path/to/file.php on line X and exactly 3 expected
More info: http://php.net/manual/en/migration71.incompatible.php