Slide 16
Slide 16 text
Return Type Hints
1 $moves = ['hop', 'skip', 'jump', 'tumble'];
2 print_r(myfunc($moves, "2")); // ['hop', 'skip']
3
The above works, the below does not:
1 $moves = ['hop', 'skip', 'jump', 'tumble'];
2 print_r(myfunc($moves, 0));
3
Fatal error: Uncaught TypeError: Return value of myfunc() must be of the
type array, boolean returned