Problème avec __callStatic
Bonjour,
J'ai beau chercher, je ne trouve pas pourquoi j'ai une fatal error :
Fatal error: Call to undefined method MaClasse::une_methode_non_declare() in C:\wamp\www\PHP\_poo_43_function_callStatic.php on line 15
Merci.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <?php
class MaClasse
{
public static function __callStatic ($nom, $arguments)
{
echo 'La méthode "' . $nom . '" a été appelée dans un contexte
statique alors qu\'elle n\'existe pas ! Ces arguments étaient les suivants :'
. implode (',',$arguments) . '<br />';
}
}
$obj = new MaClasse();
MaClasse::une_methode_non_declare (456, 'autre test');
?> |