Name: Anonymous 2008-10-12 19:51
Why the FUCK can't I assign functions to magic methods?
Wait, I can't even use them as methods?
And, dude, what the shit!?
Ok, how about...
So, I abso-fucking-lutely have to assign it?
Oh, screw you, god damn faggots.
% php -r 'class Whut{function __construct(){ $this->__call = function ($m, $v) { echo "Calling: ", $m; }; } } $n = new Whut; $n->whut();'
Fatal error: Call to undefined method Whut::whut() in Command line code on line
1Wait, I can't even use them as methods?
% php -r 'class Whut{function __construct(){ $this->__call = function ($m, $
v) { echo "Calling: ", $m; }; } } $n = new Whut; $n->__call("whut", array());'
Fatal error: Call to undefined method Whut::__call() in Command line code on lin
e 1And, dude, what the shit!?
% php -r 'function lol(){return function () {echo "Hello."; }; } lol()();'
Parse error: syntax error, unexpected '(' in Command line code on line 1Ok, how about...
% php -r 'function lol(){return function () {echo "Hello."; }; } (lol())(); $n();'
Parse error: syntax error, unexpected '(' in Command line code on line 1So, I abso-fucking-lutely have to assign it?
% php -r 'function lol(){return function () {echo "Hello."; }; } $n = lol();
$n();'
Hello!Oh, screw you, god damn faggots.