Guest User

Untitled

a guest
Aug 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. Why does PHP not throw an error when I pass too many parameters to a function?
  2. function doFoo($name = "johnny"){
  3. echo "Hello $name" . "<br />";
  4. }
  5.  
  6. doFoo();
  7. doFoo("ted");
  8. doFoo("ted", 22);
  9.  
  10. Hello johnny
  11. Hello ted
  12.  
  13. Hello ted
Add Comment
Please, Sign In to add comment