Hi all,

I'm trying to use the following code to see if a method exists and then use it if it does:

$method_exists = method_exists('myclass', 'mymethod');

   if ($method_exists && isset(myclass::mymethod('blah')) {

but I am getting the following error:

Fatal error: Can't use function return value in write context

I've looked around on google and seen various explanations of why this could occur but none of them seem to make sense with this scenario.

Any light shed on the matter would be greatly appreciated.



is the problem. Can't check if the method call isset.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.