Hello,
I am wondering if it is possible to have something like "__construc t()" for functions/methods in PHP?
e.g.
Is this possible?
Where can I find more info?
Thanks!
I am wondering if it is possible to have something like "__construc t()" for functions/methods in PHP?
e.g.
Code:
class x{ function y(){ echo "foo"; } function x(){ echo "bar"; } } new $x; $x->x(); // should automatically also call y() before init x() with output result as: "foobar"
Where can I find more info?
Thanks!
Comment