<?
function foo ($a = 10, $b){
if ($a) {
return $b/10;
}
}
echo foo(0);
Output for 8.0.13
Deprecated: Required parameter $b follows optional parameter $a in /in/HOIt1 on line 2
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 1 passed in /in/HOIt1 on line 7 and exactly 2 expected in /in/HOIt1:2
Stack trace:
#0 /in/HOIt1(7): foo(0)
#1 {main}
thrown in /in/HOIt1 on line 2
Process exited with code 255.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 1 passed in /in/HOIt1 on line 7 and exactly 2 expected in /in/HOIt1:2
Stack trace:
#0 /in/HOIt1(7): foo(0)
#1 {main}
thrown in /in/HOIt1 on line 2
Process exited with code 255.