structured programming - Calling Static Method of Class WITHOUT classname, PHP -
maybe it's foolish question, , want implement utils functions using oop in php, instead sp (strudtured programming), uses sp.
an example:
class { public static function x() { echo "using x method!"; } }
according static oop, use x function need use:
a::x();
but want use only:
x();
how can it? thk
function x() { return a::x(); }
or can try do:
function x() { return a::__function__(); }
Comments
Post a Comment