Well, I don't get why this code works
class MyObject {
public function myBaseMethod()
{
echo 'I\'m declared in' . __CLASS__;
}
}
$instance = new MyObject();
$instance->myBaseMethod();
MyObject::myBaseMethod();
// Output
I'm declared inMyObject
I'm declared inMyObject
I can invoke myBaseMethod() by creating new instance of a MyObject class or as static method. But myBaseMethod is not declared as static.
I thought that I can use :: only for static members/methods.
Any explanations pls