Hi all, I'm still playing around with OOP and to be totally honest really enjoying it! I can't believe I haven't made the switch from procedural earlier...
Something I would like to know is, how can I set default arguments for methods / functions?
What i'm getting at is, if I write this:
$user->getFirstname() it should automatically se that there are no arguments and therefore use the value of
$_SESSION['userid'] as the argument for that method. However if I write
$user->getFirstname("10") it should see the argument and use 10 as the userid instead for that particular call on the method.
I'm currently reading through http://php.net/manual/en/functions.arguments.php and I think the answer is there; it's just my lack of understanding as I'm looking at the examples cluelessly.