I have this code in one of my classes
public function __call($method, $args) {
array_unshift($args, $method);
call_user_method_array('view', $this, $args);
}
We've since switched servers, and they must use a newer version of PHP5, and I get the following message
Function call_user_method_array() is deprecated
Is there where I should use reflection? What exactly is it, and how would I use it to modify my code above to work as it used to?
http://php.net/manual/en/function.call-user-method-array.php
The call_user_method_array() function is deprecated as of PHP 4.1.0.
New way:
<?php
// Old:
// call_user_method_array('view', $this, $args);
// New:
call_user_func_array(array($this, 'view'), $args);
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With