amuck-landowner

WTF PHP?

tchen

New Member
Member calls and variables are on two separate lookup tables. ( ) automatically invokes a lookup in the method list, which doesn't have your closure since that has been assigned as a value. If you want to invoke on a member variable, then you need to call __invoke on the closure member variable.


$obj->lambda->__invoke( );
 

joepie91

New Member
Member calls and variables are on two separate lookup tables. ( ) automatically invokes a lookup in the method list, which doesn't have your closure since that has been assigned as a value. If you want to invoke on a member variable, then you need to call __invoke on the closure member variable.


$obj->lambda->__invoke( );
Problem is that this shouldn't be of any concern to a developer using PHP, rather than developing on the interpreter itself.
 

tchen

New Member
Problem is that this shouldn't be of any concern to a developer using PHP, rather than developing on the interpreter itself.
Half my brain is dedicated to memory structures, virtual tables (C++), interpreter/compiler expansions (especially Scala, and PHP magic methods), and garbage collectors.  So I can tell you with certainty, ALL languages have these types of deep knowledge issues.
 
Top
amuck-landowner