okay, lets see here. i'll give this another shot:
class one
{
function my_function()
{
echo "hello world";
}
}
class two
{
function some_function()
{
one::my_function();
}
}
so we have two classes that have nothing to do with each other. as you see in class two, we are making a call to a function that is in class one. since the function in class one is not in the scope of class two, we use the scope modifier :: to call the function. now if we add inheritance to class two, the scope modifier is not needed. it would then look like so:
class one
{
function my_function()
{
echo "hello world";
}
}
class two extends one
{
function some_function()
{
$this->my_function();
}
}
the only time you need to use the scope modifer in a situation where inheritance is involved is when you are overriding a function. take this example:
class one
{
function my_function()
{
echo "hello world";
}
}
class two extends one
{
function my_function();
{
one::my_function()
}
}
in class one we have a function called my_function(). we have a function with the same name in class two. this means that when you call the function my_function() it will call the function in class two because it has overriden the function in class one. this is where we use the scope modifier :: to call the function in class one rather than the function in class two.
here are a couple pages in the manual that deal with object oriented programming:
http://php.net/manual/en/language.oop.php
http://php.net/manual/en/ref.classobj.php
hope that helps.