Why does a PHP function with no parameters require parentheses?
- by MarkRobinson
I just spent 3 hours wondering why I couldn't start a session, then realised that I used:
session_start;
when I should have used:
session_start();
I received no error messages at all!
Perhaps then, I thought, it's a lazy way to differentiate functions from variables - but then remembered that it can't be as variables require a $
Can anyone tell me why parentheses are required then, and also why no error is given when they aren't used?