PHP sucks dick through a straw

Andy Armstrong andy at hexten.net
Fri Jan 12 20:21:55 GMT 2007


On 12 Jan 2007, at 19:50, Uri Guttman wrote:
> how could you make them work if the AUTOLOAD decides on the fly  
> whether
> to support a method or not? AUTOLOAD has to do the method work itself
> and it does not have an api just for testing if a method exists. you
> could write an AUTOLOAD that even checks its args as to whether to
> implement a method or die and can() will never be able to work around
> that. AUTOLOAD would need another api which is called by can() so  
> it can
> return true/false there. maybe call it AUTOEXISTS :).

You just implement can() with the same semantics as AUTOLOAD.

-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list