OH GOD HELP I'M IN A BOX.
PHP Code:
// someclass_a
public function foo() {
return 3.141592653;
}
PHP Code:
//someclass_b
public function foo() {
return 589793238;
}
PHP Code:
function bar() {
temp.var = new TStaticVar();
with (temp.var) {
this.join("someclass_a");
...
}
return temp.var;
}
function baz() {
temp.var = new TStaticVar();
with (temp.var) {
this.join("someclass_b");
for (c: bar().joinedclasses)
this.join(c);
...
}
}
function onCreated() {
temp.r = bar();
temp.z = baz();
echo(temp.r.foo() @ temp.z.foo());
}
Also, since I'll bet you'll be wondering, yes, you can make abstract datatypes this way. And you can inherit directly (in baz: temp.var = bar()) if children do not try to overwrite functions.
As for longer numbers, you can use strings to display them, or I'm sure there are ways (not easy ways, mind you) for arbitrary precision math. I won't go into detail.