Here is my code:
<?php
public function __construct() {
    getUsername();
}
public function getUsername() {
    //blah blah blah
    return "bobby";
}
?>
It does not work and it says this error:
Fatal error: Uncaught Error: Call to undefined function...
but if I call the function in my constructor like this: $this->getUsername(); it works. Why is that the case?
 
     
     
    