I am a little confused with this matter. I am designing an ORM class that tries to behave very similarly to ActiveRecord in ruby on rails, but that\'s beside the point.
try to use the code bellow to see the difference between self and static:
".self::$x."
";
echo "static => ".static::$x;
}
}
class Child_ extends Parent_{
protected static $x = "child";
}
echo "using the Parent_ class
";
Parent_::makeTest();
echo "
using the Child_ class
";
Child_::makeTest();
?>
and you get this result:
using the Parent_ class
- self => parent
- static => parent
using the Child_ class
- self => parent
- static => child