Attention:
<?php
// return $instance->$method(...$args);
class Abc{
protected function prefix($parameters) {
echo "xxxxxxxxxxxxxxxx\n";
var_dump($parameters);
}
public function __call($method, $args) {
echo "****************\n";
var_dump($method, $args);
// debug_zval_dump( $args );
}
}
$instance = new Abc;
$args = ['api'];
$instance->prefix(...$args);
echo 'phpversion: ', phpversion(), "\n";
?>
==========================
output on 5.6.5:
****************
string(6) "prefix"
array(0) {
}
phpversion: 5.6.5
==========================
output on other version not 5.6.5 :
****************
string(6) "prefix"
array(1) {
[0]=>
string(3) "api"
}
phpversion: 5.6.24-1+b1