In PHP, is it possible to declare a method in a class only if a statement is true :
class MyClass { //... if (mode === 'production'): public function myMethod() { // My cool stuffs here } endif; }
Aucun commentaire:
Enregistrer un commentaire